Improve source stream looping behavior
[alure.git] / include / mpark / config.hpp
blob0d6f4adc3b49b81136d69e220d8fa4bd444d6bfe
1 // MPark.Variant
2 //
3 // Copyright Michael Park, 2015-2017
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 #ifndef MPARK_CONFIG_HPP
9 #define MPARK_CONFIG_HPP
11 // MSVC 2015 Update 3.
12 #if __cplusplus < 201103L && (!defined(_MSC_VER) || _MSC_FULL_VER < 190024210)
13 #error "MPark.Variant requires C++11 support."
14 #endif
16 #ifndef __has_builtin
17 #define __has_builtin(x) 0
18 #endif
20 #ifndef __has_include
21 #define __has_include(x) 0
22 #endif
24 #ifndef __has_feature
25 #define __has_feature(x) 0
26 #endif
28 #if __has_builtin(__builtin_addressof) || \
29 (defined(__GNUC__) && __GNUC__ >= 7) || defined(_MSC_VER)
30 #define MPARK_BUILTIN_ADDRESSOF
31 #endif
33 #if __has_builtin(__builtin_unreachable)
34 #define MPARK_BUILTIN_UNREACHABLE
35 #endif
37 #if __has_builtin(__type_pack_element)
38 #define MPARK_TYPE_PACK_ELEMENT
39 #endif
41 #if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
42 #define MPARK_CPP14_CONSTEXPR
43 #endif
45 #if __has_feature(cxx_exceptions) || defined(__cpp_exceptions) || \
46 (defined(_MSC_VER) && defined(_CPPUNWIND))
47 #define MPARK_EXCEPTIONS
48 #endif
50 #if defined(__cpp_generic_lambdas) || defined(_MSC_VER)
51 #define MPARK_GENERIC_LAMBDAS
52 #endif
54 #if defined(__cpp_lib_integer_sequence)
55 #define MPARK_INTEGER_SEQUENCE
56 #endif
58 #if defined(__cpp_return_type_deduction) || defined(_MSC_VER)
59 #define MPARK_RETURN_TYPE_DEDUCTION
60 #endif
62 #if defined(__cpp_lib_transparent_operators) || defined(_MSC_VER)
63 #define MPARK_TRANSPARENT_OPERATORS
64 #endif
66 #if defined(__cpp_variable_templates) || defined(_MSC_VER)
67 #define MPARK_VARIABLE_TEMPLATES
68 #endif
70 #if !defined(__GLIBCXX__) || __has_include(<codecvt>) // >= libstdc++-5
71 #define MPARK_TRIVIALITY_TYPE_TRAITS
72 #endif
74 #endif // MPARK_CONFIG_HPP