lucenaBAL  2.0.0.20
Lucena Build Abstraction Library for C++
Platform Features

Provides feature detection describing the capabilities of platform. More...

LBAL_TYPE

These identify characteristics of certain POD types for a given compiler; preprocessor definitions are used since sizeof can’t be used by the preprocessor (reliably). These can be defined since we have special knowledge of the compile/build flags that wouldn’t necessarily be available to conforming portable code.

#define LBAL_TYPE_HAS_INT64
 
#define LBAL_TYPE_HAS_INT128
 
#define LBAL_TYPE_EXACT_WIDTH_INTEGERS
 
#define LBAL_TYPE_DOUBLE_GT_FLOAT
 
#define LBAL_TYPE_LONG_DOUBLE_GT_DOUBLE
 
#define LBAL_TYPE_WCHAR_T_IS_16_BITS
 

LBAL_FEATURE

Some compilers and platforms do things in a peculiar way that we may need to work around or otherwise deal with. Those features are noted here.

#define LBAL_FEATURE_UTF16_FILE_SYSTEM
 File system requires UTF-16 encoding. More...
 
#define LBAL_FEATURE_CONSTEXPR_INTRINSICS
 Indicate whether the current compiler’s intrinsics are constant expressions in the C++ sense. More...
 

Detailed Description

Provides feature detection describing the capabilities of platform.

These are all simple availability flags, and will be set to 1 if a feature is available and 0 otherwise.

Mostly, the platform features are actually compiler features whose availability is intentionally dependent on the target platform.

Remarks
There are compiler features whose availability is dependent on the target platform, but not by design. These are documented under compiler feature detection.

Macro Definition Documentation

◆ LBAL_FEATURE_CONSTEXPR_INTRINSICS

#define LBAL_FEATURE_CONSTEXPR_INTRINSICS

Indicate whether the current compiler’s intrinsics are constant expressions in the C++ sense.

In the absence of a means to identify whether a given function is constexpr at compile-time, we rely on tools like this to aid us in determining, expression-by-expression, whether a given function is probably able to be declared constexpr.

Remarks
SEEME This is most likely insufficiently granular, but it’s academic for now: none of the supported compilers advertise constexpr intrinsics, and to the extent that they have any, it’s pure happenstance and dangerous to rely on.

◆ LBAL_FEATURE_UTF16_FILE_SYSTEM

#define LBAL_FEATURE_UTF16_FILE_SYSTEM

File system requires UTF-16 encoding.

It is assumed that the file system uses UTF-8 encoding unless this feature conditional is set.

Remarks
APIME Really only necessary for Windows.

◆ LBAL_TYPE_DOUBLE_GT_FLOAT

#define LBAL_TYPE_DOUBLE_GT_FLOAT

double is distinct from float

◆ LBAL_TYPE_EXACT_WIDTH_INTEGERS

#define LBAL_TYPE_EXACT_WIDTH_INTEGERS

availability of C99 exact width int types

◆ LBAL_TYPE_HAS_INT128

#define LBAL_TYPE_HAS_INT128

native 128-bit ints - including usigned ints - as __int128_t and __uint128_t

◆ LBAL_TYPE_HAS_INT64

#define LBAL_TYPE_HAS_INT64

native 64-bit ints - including usigned ints - as int64_t and uint64_t (and possibly also long long and unsigned long long, depending)

◆ LBAL_TYPE_LONG_DOUBLE_GT_DOUBLE

#define LBAL_TYPE_LONG_DOUBLE_GT_DOUBLE

long double is distinct from double

◆ LBAL_TYPE_WCHAR_T_IS_16_BITS

#define LBAL_TYPE_WCHAR_T_IS_16_BITS

if this is 0, wchar_t is assumed to be a 32-bit integer type