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