21#if defined(BASE_LIB) | defined(BASE2017_LIB)
22# define BASE_EXPORT EXPORT_TAG
24# define BASE_EXPORT IMPORT_TAG
31using char16 = char16_t;
36using uint16 = uint16_t;
38using uint32 = uint32_t;
40using int64 =
long long int;
41using uint64 =
unsigned long long int;
44using uint64 = uint64_t;
48static constexpr int32 linuxOS = 2;
49static constexpr int32 windowsOS = 1;
52# define _EM_OVERFLOW FE_OVERFLOW
53# define _EM_INVALID FE_INVALID
54# define _EM_UNDERFLOW FE_UNDERFLOW
55# define _EM_ZERODIVIDE FE_DIVBYZERO
56 inline unsigned doClearFP() {
57 int ret = fetestexcept(FE_ALL_EXCEPT);
58 feclearexcept(FE_ALL_EXCEPT);
61# define _clearfp doClearFP
63 static constexpr int32 currentOS = linuxOS;
64 template <
typename T,
typename U>
65 constexpr const U &osval(
const T &,
const U &lval) {
return lval; }
68 static constexpr int32 currentOS = windowsOS;
69 template <
typename T,
typename U>
70 constexpr const T &osval(
const T &wval,
const U &) {
return wval; }
79# define CHECK_FP_STATUS checkFPStatus(__FILE__,__LINE__)
80# define CLEAR_FP_STATUS _clearfp()
82# define CHECK_FP_STATUS __noop()
83# define CLEAR_FP_STATUS __noop()
86# define FP_S CHECK_FP_STATUS
88# define FP_C CLEAR_FP_STATUS
91BASE_EXPORT const char16 *checkFPStatus(
const char *file=0,uint32 line=0);
92enum FloatingPointCheck { FloatingPointCheckOff, FloatingPointCheckWarning, FloatingPointCheckException };
93BASE_EXPORT FloatingPointCheck floatingPointCheckStatus();
94BASE_EXPORT void floatingPointCheckStatus(FloatingPointCheck fpc);
95static constexpr bool isCurrentOS(
int i) {
return i==currentOS; }
100#define FOR(x,y) for (auto x=(y).begin();x!=(y).end();++x)
104static constexpr bool isDebugCompile =
false;
106static constexpr bool isDebugCompile =
true;
112# define filesystem ERROR_USE_SHARED_FILESTORE_INSTEAD
Defines automatic generation of DLL exports and imports for each system supported.
uint32 TType
class type indicator
Definition basedef.h:46
#define BASE_EXPORT
Definition basedef.h:24