xtd 0.2.0
Loading...
Searching...
No Matches
__xtd_std_version.hpp
Go to the documentation of this file.
1
3#pragma once
5#if !defined(__XTD_STD_INTERNAL__)
6#error "Do not include this file: Internal use only"
7#endif
9
10// Sometimes the preprocessor macros corresponding to C++ language and library features are not bee respected by compilers
11// In this case, xtd uses its own definition. It begins with the prefix `__xtd`.
12// See https://en.cppreference.com/w/cpp/feature_test and https://en.cppreference.com/w/cpp/compiler_support for more information.
13// Warning Internal useonly.
14
16#include <version>
17
18#if defined(__cpp_lib_any) || __cplusplus >= 201703l
19#define __xtd__cpp_lib_any
20#endif
21
22#if defined(__cpp_lib_char8_t)
23#define __xtd__cpp_lib_char8_t
24#endif
25
26#if defined(__cpp_lib_filesystem)
27#define __xtd__cpp_lib_filesystem
28#endif
29
30#if (defined(__cpp_lib_format) && defined(_MSC_VER) && _MSC_VER >= 1932) || (defined(__apple_build_version__) && __apple_build_version__ >= 15000300) || (!defined(__APPLE__) && defined(__GNUC__) && __GNUC__ >= 13) || (!defined(__APPLE__) && defined(__clang_major__) && __clang_major__ >= 15)
31#define __xtd__cpp_lib_format
32#endif
33
34#if defined(__cpp_lib_optional) || __cplusplus >= 201703l
35#define __xtd__cpp_lib_optional
36#endif
37
38#if defined(__cpp_lib_semaphore) || __cplusplus >= 202002l
39#define __xtd__cpp_lib_semaphore
40#endif
41
42#if defined(__cpp_lib_three_way_comparison) || __cplusplus >= 201907
43#define __xtd__cpp_lib_three_way_comparison
44#endif
45
46#if defined(__cpp_lib_source_location)
47#define __xtd__cpp_lib_source_location
48#endif
49