xtd 0.2.0
Loading...
Searching...
No Matches
__xtd_std_version.hpp
Go to the documentation of this file.
1
3#pragma once
8
9#if !defined(__XTD_STD_INTERNAL__)
10#error "Do not include this file: Internal use only"
11#endif
13
14// Sometimes the preprocessor macros corresponding to C++ language and library features are not bee respected by compilers
15// In this case, xtd uses its own definition. It begins with the prefix `__xtd`.
16// See https://en.cppreference.com/w/cpp/feature_test and https://en.cppreference.com/w/cpp/compiler_support for more information.
17// Warning Internal useonly.
18
20#include <version>
21
22#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)
23#define __xtd__cpp_lib_format
24#endif
25
26#if defined(__cpp_lib_ranges)
27#define __xtd__cpp_lib_ranges
28#endif
29
30#if defined(__cpp_lib_source_location)
31#define __xtd__cpp_lib_source_location
32#endif
33
34#if defined(__cpp_lib_type_identity)
35#define __xtd__cpp_lib_type_identity
36#endif
37
Contains C++ exceptions check.
Contains C++ RTTI check.
Contains C++ version check.