DynXX-Cxx
Loading...
Searching...
No Matches
Macro.hxx
Go to the documentation of this file.
1#pragma once
2
3#if defined(__cpp_lib_to_chars) && defined(DYNXX_USE_STD_TO_CHARS)
4 #if (__cpp_lib_to_chars >= 201611L)
5 #define DYNXX_USE_STD_CHAR_CONV_INT
6 #endif
7 #if (__cpp_lib_to_chars >= 201907L)
8 #define DYNXX_USE_STD_CHAR_CONV_FLOAT
9 #endif
10#endif
11
12#if defined(__cpp_lib_format) && defined(DYNXX_USE_STD_TO_CHARS)
13 #define DYNXX_USE_STD_FORMAT
14#endif
15
16#ifndef DYNXX_NO_UNIQUE_ADDRESS
17# if defined(_MSC_VER) && _MSC_VER >= 1929
18# define DYNXX_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
19# elif defined(__has_cpp_attribute) && __has_cpp_attribute(no_unique_address)
20# define DYNXX_NO_UNIQUE_ADDRESS [[no_unique_address]]
21# else
22# define DYNXX_NO_UNIQUE_ADDRESS
23# endif
24#endif
25
26#ifndef DYNXX_USE_DEDUCING_THIS
27#if defined(__cpp_explicit_this_parameter) && (__cpp_explicit_this_parameter >= 202110L) && !defined(__OHOS__)
28#define DYNXX_USE_DEDUCING_THIS 1
29#else
30#define DYNXX_USE_DEDUCING_THIS 0
31#endif
32#endif