From e3973fd962dff8e6d879173fc2444dce367246f3 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 12 Sep 2018 19:41:40 +0000 Subject: [PATCH] Implement the infrastructure for feature-test macros. Very few actual feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342073 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/algorithm | 1 + include/any | 1 + include/array | 1 + include/atomic | 5 +- include/bit | 1 + include/chrono | 1 + include/cmath | 1 + include/complex | 1 + include/cstddef | 1 + include/deque | 1 + include/exception | 1 + include/filesystem | 5 +- include/forward_list | 1 + include/functional | 3 +- include/iomanip | 1 + include/iterator | 1 + include/list | 1 + include/map | 1 + include/memory | 1 + include/mutex | 1 + include/new | 1 + include/numeric | 1 + include/optional | 1 + include/regex | 1 + include/scoped_allocator | 1 + include/set | 1 + include/shared_mutex | 1 + include/string | 1 + include/string_view | 1 + include/tuple | 1 + include/type_traits | 2 +- include/unordered_map | 1 + include/unordered_set | 1 + include/utility | 1 + include/variant | 1 + include/vector | 1 + include/version | 13 ++ .../algorithm.version.pass.cpp | 36 +++++ .../any.version.pass.cpp | 32 +++++ .../array.version.pass.cpp | 33 +++++ .../atomic.version.pass.cpp | 41 ++++++ .../bit.version.pass.cpp | 32 +++++ .../chrono.version.pass.cpp | 32 +++++ .../cmath.version.pass.cpp | 33 +++++ .../complex.version.pass.cpp | 32 +++++ .../concepts.version.pass.cpp | 33 +++++ .../cstddef.version.pass.cpp | 32 +++++ .../deque.version.pass.cpp | 33 +++++ .../exception.version.pass.cpp | 32 +++++ .../execution.version.pass.cpp | 33 +++++ .../filesystem.version.pass.cpp | 40 ++++++ .../forward_list.version.pass.cpp | 35 +++++ .../functional.version.pass.cpp | 44 ++++++ .../iomanip.version.pass.cpp | 32 +++++ .../iterator.version.pass.cpp | 35 +++++ .../list.version.pass.cpp | 35 +++++ .../map.version.pass.cpp | 36 +++++ .../memory.version.pass.cpp | 39 +++++ .../memory_resource.version.pass.cpp | 33 +++++ .../mutex.version.pass.cpp | 32 +++++ .../new.version.pass.cpp | 33 +++++ .../numeric.version.pass.cpp | 33 +++++ .../optional.version.pass.cpp | 32 +++++ .../regex.version.pass.cpp | 32 +++++ .../scoped_allocator.version.pass.cpp | 32 +++++ .../set.version.pass.cpp | 35 +++++ .../shared_mutex.version.pass.cpp | 33 +++++ .../string.version.pass.cpp | 35 +++++ .../string_view.version.pass.cpp | 32 +++++ .../tuple.version.pass.cpp | 35 +++++ .../type_traits.version.pass.cpp | 53 +++++++ .../unordered_map.version.pass.cpp | 35 +++++ .../unordered_set.version.pass.cpp | 34 +++++ .../utility.version.pass.cpp | 36 +++++ .../variant.version.pass.cpp | 32 +++++ .../vector.version.pass.cpp | 34 +++++ .../version.version.pass.cpp | 135 ++++++++++++++++++ 77 files changed, 1535 insertions(+), 11 deletions(-) create mode 100644 test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp create mode 100644 test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp diff --git a/include/algorithm b/include/algorithm index 55e1f9fc1..1359fda53 100644 --- a/include/algorithm +++ b/include/algorithm @@ -646,6 +646,7 @@ template #include #include #include +#include #include <__debug> diff --git a/include/any b/include/any index e6e0b6ea6..e2945bdfa 100644 --- a/include/any +++ b/include/any @@ -87,6 +87,7 @@ namespace std { #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/array b/include/array index ba4ff4260..8f4e111ac 100644 --- a/include/array +++ b/include/array @@ -112,6 +112,7 @@ template const T&& get(const array&&) noexce #include #include #include // for _LIBCPP_UNREACHABLE +#include #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/include/atomic b/include/atomic index 809f78a06..d37e7b4b0 100644 --- a/include/atomic +++ b/include/atomic @@ -544,6 +544,7 @@ void atomic_signal_fence(memory_order m) noexcept; #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -559,10 +560,6 @@ void atomic_signal_fence(memory_order m) noexcept; #error C++ standard library is incompatible with #endif -#if _LIBCPP_STD_VER > 14 -# define __cpp_lib_atomic_is_always_lock_free 201603L -#endif - #define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \ _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \ __m == memory_order_acquire || \ diff --git a/include/bit b/include/bit index 5bf5214f3..db3812e5b 100644 --- a/include/bit +++ b/include/bit @@ -21,6 +21,7 @@ namespace std { */ #include <__config> +#include #if defined(__IBMCPP__) #include "support/ibm/support.h" diff --git a/include/chrono b/include/chrono index b9709b373..069110101 100644 --- a/include/chrono +++ b/include/chrono @@ -798,6 +798,7 @@ constexpr chrono::year operator ""y(unsigned lo #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/cmath b/include/cmath index ffb1c46c7..f5f62adcf 100644 --- a/include/cmath +++ b/include/cmath @@ -303,6 +303,7 @@ long double truncl(long double x); #include <__config> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/complex b/include/complex index d692ee319..8cf6a946d 100644 --- a/include/complex +++ b/include/complex @@ -245,6 +245,7 @@ template #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/cstddef b/include/cstddef index b45dbe21d..b4c42b19d 100644 --- a/include/cstddef +++ b/include/cstddef @@ -35,6 +35,7 @@ Types: */ #include <__config> +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/deque b/include/deque index bfbd3a5ef..414c7a859 100644 --- a/include/deque +++ b/include/deque @@ -161,6 +161,7 @@ template #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/exception b/include/exception index b517486b5..7fd92798b 100644 --- a/include/exception +++ b/include/exception @@ -81,6 +81,7 @@ template void rethrow_if_nested(const E& e); #include #include #include +#include #if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) #include diff --git a/include/filesystem b/include/filesystem index aa1d71800..7547e6c5a 100644 --- a/include/filesystem +++ b/include/filesystem @@ -244,6 +244,7 @@ #include #include // for quoted #include +#include #include <__debug> @@ -256,10 +257,6 @@ _LIBCPP_PUSH_MACROS #ifndef _LIBCPP_CXX03_LANG -#if _LIBCPP_STD_VER >= 17 -#define __cpp_lib_filesystem 201703 -#endif - _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM struct _FilesystemClock { diff --git a/include/forward_list b/include/forward_list index 571afdc92..f9a71f033 100644 --- a/include/forward_list +++ b/include/forward_list @@ -177,6 +177,7 @@ template #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/functional b/include/functional index b91fd7542..41beb404b 100644 --- a/include/functional +++ b/include/functional @@ -487,6 +487,7 @@ POLICY: For non-variadic implementations, the number of arguments is limited #include #include #include +#include #include <__functional_base> @@ -2340,8 +2341,6 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args) #if _LIBCPP_STD_VER > 14 -#define __cpp_lib_invoke 201411 - template result_of_t<_Fn&&(_Args&&...)> invoke(_Fn&& __f, _Args&&... __args) diff --git a/include/iomanip b/include/iomanip index a6bee736f..36c11167a 100644 --- a/include/iomanip +++ b/include/iomanip @@ -46,6 +46,7 @@ template #include <__config> #include <__string> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/iterator b/include/iterator index 9415e0b83..aed0525db 100644 --- a/include/iterator +++ b/include/iterator @@ -418,6 +418,7 @@ template constexpr const E* data(initializer_list il) noexcept; #include #include #include +#include #ifdef __APPLE__ #include #endif diff --git a/include/list b/include/list index 49e2e1e1b..8f0e1db1f 100644 --- a/include/list +++ b/include/list @@ -181,6 +181,7 @@ template #include #include #include +#include #include <__debug> diff --git a/include/map b/include/map index 4700a09ed..cfd828058 100644 --- a/include/map +++ b/include/map @@ -460,6 +460,7 @@ swap(multimap& x, #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/memory b/include/memory index de3f52d6a..276b3b763 100644 --- a/include/memory +++ b/include/memory @@ -667,6 +667,7 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space); #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) # include #endif +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/mutex b/include/mutex index 52e39b0fb..9c55c7cc1 100644 --- a/include/mutex +++ b/include/mutex @@ -194,6 +194,7 @@ template #ifndef _LIBCPP_CXX03_LANG #include #endif +#include #include <__threading_support> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/include/new b/include/new index d27ff2982..8d72ba5c8 100644 --- a/include/new +++ b/include/new @@ -91,6 +91,7 @@ void operator delete[](void* ptr, void*) noexcept; #include #include #include +#include #ifdef _LIBCPP_NO_EXCEPTIONS #include #endif diff --git a/include/numeric b/include/numeric index 70ef173ea..4e68239d0 100644 --- a/include/numeric +++ b/include/numeric @@ -142,6 +142,7 @@ template #include #include // for numeric_limits #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/optional b/include/optional index a76f8d189..9ef0aac39 100644 --- a/include/optional +++ b/include/optional @@ -156,6 +156,7 @@ template #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/regex b/include/regex index dcdb14af9..db15f78e4 100644 --- a/include/regex +++ b/include/regex @@ -769,6 +769,7 @@ typedef regex_token_iterator wsregex_token_iterator; #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/scoped_allocator b/include/scoped_allocator index 4760d946d..bdbb0136b 100644 --- a/include/scoped_allocator +++ b/include/scoped_allocator @@ -108,6 +108,7 @@ template #include <__config> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/set b/include/set index 108a9e97f..f2ce6ea2f 100644 --- a/include/set +++ b/include/set @@ -402,6 +402,7 @@ swap(multiset& x, multiset& y) #include <__tree> #include <__node_handle> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/shared_mutex b/include/shared_mutex index a7735d673..fbde0cf13 100644 --- a/include/shared_mutex +++ b/include/shared_mutex @@ -124,6 +124,7 @@ template */ #include <__config> +#include _LIBCPP_PUSH_MACROS #include <__undef_macros> diff --git a/include/string b/include/string index 162e54058..c79164cb2 100644 --- a/include/string +++ b/include/string @@ -510,6 +510,7 @@ basic_string operator "" s( const char32_t *str, size_t len ); // C++1 #include #include #include <__functional_base> +#include #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS #include #endif diff --git a/include/string_view b/include/string_view index 6377aeb6d..55dce7271 100644 --- a/include/string_view +++ b/include/string_view @@ -178,6 +178,7 @@ namespace std { #include #include #include +#include #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/include/tuple b/include/tuple index b3a17e7b7..fb5428ec1 100644 --- a/include/tuple +++ b/include/tuple @@ -141,6 +141,7 @@ template #include #include <__functional_base> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/type_traits b/include/type_traits index e413d2656..7ff67bfdb 100644 --- a/include/type_traits +++ b/include/type_traits @@ -404,6 +404,7 @@ namespace std */ #include <__config> #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -4758,7 +4759,6 @@ struct __has_operator_addressof #if _LIBCPP_STD_VER > 14 -#define __cpp_lib_void_t 201411 template using void_t = void; # ifndef _LIBCPP_HAS_NO_VARIADICS diff --git a/include/unordered_map b/include/unordered_map index 348f57923..fc3cfb6a9 100644 --- a/include/unordered_map +++ b/include/unordered_map @@ -386,6 +386,7 @@ template #include #include #include +#include #include <__debug> diff --git a/include/unordered_set b/include/unordered_set index 9b8560da4..a219fa609 100644 --- a/include/unordered_set +++ b/include/unordered_set @@ -338,6 +338,7 @@ template #include <__hash_table> #include <__node_handle> #include +#include #include <__debug> diff --git a/include/utility b/include/utility index ed9bf030d..570ec05ae 100644 --- a/include/utility +++ b/include/utility @@ -203,6 +203,7 @@ template #include #include #include +#include #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/include/variant b/include/variant index 6c7dca215..6a523569e 100644 --- a/include/variant +++ b/include/variant @@ -208,6 +208,7 @@ namespace std { #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/vector b/include/vector index 9245ba18c..e7aaa4df6 100644 --- a/include/vector +++ b/include/vector @@ -276,6 +276,7 @@ void swap(vector& x, vector& y) #include #include #include +#include #include <__split_buffer> #include <__functional_base> diff --git a/include/version b/include/version index 6d1041148..80c27971f 100644 --- a/include/version +++ b/include/version @@ -101,4 +101,17 @@ __cpp_lib_void_t 201411L #pragma GCC system_header #endif +#if _LIBCPP_STD_VER > 11 +#endif + +#if _LIBCPP_STD_VER > 14 +# define __cpp_lib_atomic_is_always_lock_free 201603L +# define __cpp_lib_filesystem 201703L +# define __cpp_lib_invoke 201411L +# define __cpp_lib_void_t 201411L +#endif + +#if _LIBCPP_STD_VER > 17 +#endif + #endif // _LIBCPP_VERSIONH diff --git a/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp new file mode 100644 index 000000000..37a636f32 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp @@ -0,0 +1,36 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_clamp 201603L + __cpp_lib_constexpr_swap_algorithms 201806L + __cpp_lib_parallel_algorithm 201603L + __cpp_lib_robust_nonmodifying_seq_ops 201304L + __cpp_lib_sample 201603L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp new file mode 100644 index 000000000..951afbc08 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_any 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp new file mode 100644 index 000000000..548abe648 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_array_constexpr 201603L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp new file mode 100644 index 000000000..032ec269e --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp @@ -0,0 +1,41 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_atomic_is_always_lock_free 201603L + __cpp_lib_atomic_ref 201806L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_atomic_is_always_lock_free) +# error "__cpp_lib_atomic_is_always_lock_free is not defined" +# elif __cpp_lib_atomic_is_always_lock_free < 201603L +# error "__cpp_lib_atomic_is_always_lock_free has an invalid value" +# endif +#endif + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp new file mode 100644 index 000000000..2dfe4a8b1 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_bit_cast 201806L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp new file mode 100644 index 000000000..5d1755ba7 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_chrono 201611L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp new file mode 100644 index 000000000..e8479d1c8 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_hypot 201603L + __cpp_lib_math_special_functions 201603L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp new file mode 100644 index 000000000..dd64efb11 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_complex_udls 201309L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp new file mode 100644 index 000000000..06f244834 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_concepts 201806L + +*/ + +// XFAIL +// #include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp new file mode 100644 index 000000000..ac8dfbb04 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_byte 201603L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp new file mode 100644 index 000000000..faa9063f4 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp new file mode 100644 index 000000000..a77ce5f1c --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_uncaught_exceptions 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp new file mode 100644 index 000000000..4cc630733 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_execution 201603L + +*/ + +// XFAIL +// #include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp new file mode 100644 index 000000000..46ad17d75 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp @@ -0,0 +1,40 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_filesystem 201703L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_filesystem) +# error "__cpp_lib_filesystem is not defined" +# elif __cpp_lib_filesystem < 201703L +# error "__cpp_lib_filesystem has an invalid value" +# endif +#endif + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp new file mode 100644 index 000000000..b262d70dd --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_incomplete_container_elements 201505L + __cpp_lib_list_remove_return_type 201806L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp new file mode 100644 index 000000000..a24de49f3 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp @@ -0,0 +1,44 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_boyer_moore_searcher 201603L + __cpp_lib_invoke 201411L + __cpp_lib_not_fn 201603L + __cpp_lib_result_of_sfinae 201210L + __cpp_lib_transparent_operators 201510L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_invoke) +# error "__cpp_lib_invoke is not defined" +# elif __cpp_lib_invoke < 201411L +# error "__cpp_lib_invoke has an invalid value" +# endif +#endif + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp new file mode 100644 index 000000000..35ed34b50 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_quoted_string_io 201304L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp new file mode 100644 index 000000000..02e028649 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_array_constexpr 201603L + __cpp_lib_make_reverse_iterator 201402L + __cpp_lib_nonmember_container_access 201411L + __cpp_lib_null_iterators 201304L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp new file mode 100644 index 000000000..ad666d152 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_incomplete_container_elements 201505L + __cpp_lib_list_remove_return_type 201806L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp new file mode 100644 index 000000000..933449ce5 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp @@ -0,0 +1,36 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_generic_associative_lookup 201304L + __cpp_lib_map_try_emplace 201411L + __cpp_lib_node_extract 201606L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp new file mode 100644 index 000000000..5dbd6ab5f --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp @@ -0,0 +1,39 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_addressof_constexpr 201603L + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_enable_shared_from_this 201603L + __cpp_lib_make_unique 201304L + __cpp_lib_raw_memory_algorithms 201606L + __cpp_lib_shared_ptr_arrays 201611L + __cpp_lib_shared_ptr_weak_type 201606L + __cpp_lib_transparent_operators 201510L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp new file mode 100644 index 000000000..30c27233b --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_memory_resource 201603L + +*/ + +// XFAIL +// #include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp new file mode 100644 index 000000000..1909b31a1 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_scoped_lock 201703L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp new file mode 100644 index 000000000..6daca346f --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_hardware_interference_size 201703L + __cpp_lib_launder 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp new file mode 100644 index 000000000..fbe100ba8 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_gcd_lcm 201606L + __cpp_lib_parallel_algorithm 201603L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp new file mode 100644 index 000000000..b78eda604 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_optional 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp new file mode 100644 index 000000000..91222ce64 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp new file mode 100644 index 000000000..c43069186 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp new file mode 100644 index 000000000..dc414f0fd --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_generic_associative_lookup 201304L + __cpp_lib_node_extract 201606L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp new file mode 100644 index 000000000..c12ebabb3 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp @@ -0,0 +1,33 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_shared_mutex 201505L + __cpp_lib_shared_timed_mutex 201402L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp new file mode 100644 index 000000000..2b755b691 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_nonmember_container_access 201411L + __cpp_lib_string_udls 201304L + __cpp_lib_string_view 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp new file mode 100644 index 000000000..53e76821b --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_string_view 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp new file mode 100644 index 000000000..921b8ae93 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_apply 201603L + __cpp_lib_make_from_tuple 201606L + __cpp_lib_tuple_element_t 201402L + __cpp_lib_tuples_by_type 201304L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp new file mode 100644 index 000000000..9f7ecedb5 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp @@ -0,0 +1,53 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_bool_constant 201505L + __cpp_lib_has_unique_object_representations 201606L + __cpp_lib_integral_constant_callable 201304L + __cpp_lib_is_aggregate 201703L + __cpp_lib_is_final 201402L + __cpp_lib_is_invocable 201703L + __cpp_lib_is_null_pointer 201309L + __cpp_lib_is_swappable 201603L + __cpp_lib_logical_traits 201510L + __cpp_lib_result_of_sfinae 201210L + __cpp_lib_transformation_trait_aliases 201304L + __cpp_lib_type_trait_variable_templates 201510L + __cpp_lib_void_t 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_void_t) +# error "__cpp_lib_void_t is not defined" +# elif __cpp_lib_void_t < 201411L +# error "__cpp_lib_void_t has an invalid value" +# endif +#endif + + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp new file mode 100644 index 000000000..cf01b4afc --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp @@ -0,0 +1,35 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_node_extract 201606L + __cpp_lib_nonmember_container_access 201411L + __cpp_lib_unordered_map_try_emplace 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp new file mode 100644 index 000000000..b8e70636c --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp @@ -0,0 +1,34 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_node_extract 201606L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp new file mode 100644 index 000000000..e67cb94d8 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp @@ -0,0 +1,36 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_as_const 201510L + __cpp_lib_exchange_function 201304L + __cpp_lib_integer_sequence 201304L + __cpp_lib_to_chars 201611L + __cpp_lib_tuples_by_type 201304L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp new file mode 100644 index 000000000..75f228ba9 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp @@ -0,0 +1,32 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_variant 201606L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp new file mode 100644 index 000000000..f033d4476 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp @@ -0,0 +1,34 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_incomplete_container_elements 201505L + __cpp_lib_nonmember_container_access 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +} diff --git a/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp new file mode 100644 index 000000000..5bc7f9aa0 --- /dev/null +++ b/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp @@ -0,0 +1,135 @@ + +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// feature macros + +/* Constant Value + __cpp_lib_addressof_constexpr 201603L + __cpp_lib_allocator_traits_is_always_equal 201411L + __cpp_lib_any 201606L + __cpp_lib_apply 201603L + __cpp_lib_array_constexpr 201603L + __cpp_lib_as_const 201510L + __cpp_lib_atomic_is_always_lock_free 201603L + __cpp_lib_atomic_ref 201806L + __cpp_lib_bit_cast 201806L + __cpp_lib_bool_constant 201505L + __cpp_lib_boyer_moore_searcher 201603L + __cpp_lib_byte 201603L + __cpp_lib_chrono 201611L + __cpp_lib_clamp 201603L + __cpp_lib_complex_udls 201309L + __cpp_lib_concepts 201806L + __cpp_lib_constexpr_swap_algorithms 201806L + __cpp_lib_enable_shared_from_this 201603L + __cpp_lib_exchange_function 201304L + __cpp_lib_execution 201603L + __cpp_lib_filesystem 201703L + __cpp_lib_gcd_lcm 201606L + __cpp_lib_generic_associative_lookup 201304L + __cpp_lib_hardware_interference_size 201703L + __cpp_lib_has_unique_object_representations 201606L + __cpp_lib_hypot 201603L + __cpp_lib_incomplete_container_elements 201505L + __cpp_lib_integer_sequence 201304L + __cpp_lib_integral_constant_callable 201304L + __cpp_lib_invoke 201411L + __cpp_lib_is_aggregate 201703L + __cpp_lib_is_final 201402L + __cpp_lib_is_invocable 201703L + __cpp_lib_is_null_pointer 201309L + __cpp_lib_is_swappable 201603L + __cpp_lib_launder 201606L + __cpp_lib_list_remove_return_type 201806L + __cpp_lib_logical_traits 201510L + __cpp_lib_make_from_tuple 201606L + __cpp_lib_make_reverse_iterator 201402L + __cpp_lib_make_unique 201304L + __cpp_lib_map_try_emplace 201411L + __cpp_lib_math_special_functions 201603L + __cpp_lib_memory_resource 201603L + __cpp_lib_node_extract 201606L + __cpp_lib_nonmember_container_access 201411L + __cpp_lib_not_fn 201603L + __cpp_lib_null_iterators 201304L + __cpp_lib_optional 201606L + __cpp_lib_parallel_algorithm 201603L + __cpp_lib_quoted_string_io 201304L + __cpp_lib_raw_memory_algorithms 201606L + __cpp_lib_result_of_sfinae 201210L + __cpp_lib_robust_nonmodifying_seq_ops 201304L + __cpp_lib_sample 201603L + __cpp_lib_scoped_lock 201703L + __cpp_lib_shared_mutex 201505L + __cpp_lib_shared_ptr_arrays 201611L + __cpp_lib_shared_ptr_weak_type 201606L + __cpp_lib_shared_timed_mutex 201402L + __cpp_lib_string_udls 201304L + __cpp_lib_string_view 201606L + __cpp_lib_to_chars 201611L + __cpp_lib_transformation_trait_aliases 201304L + __cpp_lib_transparent_operators 201510L + __cpp_lib_tuple_element_t 201402L + __cpp_lib_tuples_by_type 201304L + __cpp_lib_type_trait_variable_templates 201510L + __cpp_lib_uncaught_exceptions 201411L + __cpp_lib_unordered_map_try_emplace 201411L + __cpp_lib_variant 201606L + __cpp_lib_void_t 201411L + +*/ + +#include +#include "test_macros.h" + +int main() +{ +// ensure that the macros that are supposed to be defined in are defined. + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_atomic_is_always_lock_free) +# error "__cpp_lib_atomic_is_always_lock_free is not defined" +# elif __cpp_lib_atomic_is_always_lock_free < 201603L +# error "__cpp_lib_atomic_is_always_lock_free has an invalid value" +# endif +#endif + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_filesystem) +# error "__cpp_lib_filesystem is not defined" +# elif __cpp_lib_filesystem < 201703L +# error "__cpp_lib_filesystem has an invalid value" +# endif +#endif + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_invoke) +# error "__cpp_lib_invoke is not defined" +# elif __cpp_lib_invoke < 201411L +# error "__cpp_lib_invoke has an invalid value" +# endif +#endif + +#if _TEST_STD_VER > 14 +# if !defined(__cpp_lib_void_t) +# error "__cpp_lib_void_t is not defined" +# elif __cpp_lib_void_t < 201411L +# error "__cpp_lib_void_t has an invalid value" +# endif +#endif + +/* +#if !defined(__cpp_lib_fooby) +# error "__cpp_lib_fooby is not defined" +#elif __cpp_lib_fooby < 201606L +# error "__cpp_lib_fooby has an invalid value" +#endif +*/ +}