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
This commit is contained in:
Marshall Clow
2018-09-12 19:41:40 +00:00
parent 420ace6f28
commit e3973fd962
77 changed files with 1535 additions and 11 deletions

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <algorithm> 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 <algorithm>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <algorithm> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <any> feature macros
/* Constant Value
__cpp_lib_any 201606L
*/
#include <any>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <any> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <array> feature macros
/* Constant Value
__cpp_lib_array_constexpr 201603L
__cpp_lib_nonmember_container_access 201411L
*/
#include <array>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <array> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <atomic> feature macros
/* Constant Value
__cpp_lib_atomic_is_always_lock_free 201603L
__cpp_lib_atomic_ref 201806L
*/
#include <atomic>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <atomic> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <bit> feature macros
/* Constant Value
__cpp_lib_bit_cast 201806L
*/
#include <bit>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <bit> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <chrono> feature macros
/* Constant Value
__cpp_lib_chrono 201611L
*/
#include <chrono>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <chrono> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <cmath> feature macros
/* Constant Value
__cpp_lib_hypot 201603L
__cpp_lib_math_special_functions 201603L
*/
#include <cmath>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <cmath> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <complex> feature macros
/* Constant Value
__cpp_lib_complex_udls 201309L
*/
#include <complex>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <complex> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <concepts> feature macros
/* Constant Value
__cpp_lib_concepts 201806L
*/
// XFAIL
// #include <concepts>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <concepts> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <cstddef> feature macros
/* Constant Value
__cpp_lib_byte 201603L
*/
#include <cstddef>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <cstddef> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <deque> feature macros
/* Constant Value
__cpp_lib_allocator_traits_is_always_equal 201411L
__cpp_lib_nonmember_container_access 201411L
*/
#include <deque>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <deque> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <exception> feature macros
/* Constant Value
__cpp_lib_uncaught_exceptions 201411L
*/
#include <exception>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <exception> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <execution> feature macros
/* Constant Value
__cpp_lib_execution 201603L
*/
// XFAIL
// #include <execution>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <execution> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <filesystem> feature macros
/* Constant Value
__cpp_lib_filesystem 201703L
*/
#include <filesystem>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <filesystem> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <forward_list> 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 <forward_list>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <forward_list> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <functional> 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 <functional>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <functional> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <iomanip> feature macros
/* Constant Value
__cpp_lib_quoted_string_io 201304L
*/
#include <iomanip>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <iomanip> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <iterator> 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 <iterator>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <iterator> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <list> 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 <list>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <list> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <map> 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 <map>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <map> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <memory> 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 <memory>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <memory> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <memory_resource> feature macros
/* Constant Value
__cpp_lib_memory_resource 201603L
*/
// XFAIL
// #include <memory_resource>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <memory_resource> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <mutex> feature macros
/* Constant Value
__cpp_lib_scoped_lock 201703L
*/
#include <mutex>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <mutex> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <new> feature macros
/* Constant Value
__cpp_lib_hardware_interference_size 201703L
__cpp_lib_launder 201606L
*/
#include <new>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <new> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <numeric> feature macros
/* Constant Value
__cpp_lib_gcd_lcm 201606L
__cpp_lib_parallel_algorithm 201603L
*/
#include <numeric>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <numeric> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <optional> feature macros
/* Constant Value
__cpp_lib_optional 201606L
*/
#include <optional>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <optional> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <regex> feature macros
/* Constant Value
__cpp_lib_nonmember_container_access 201411L
*/
#include <regex>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <regex> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <scoped_allocator> feature macros
/* Constant Value
__cpp_lib_allocator_traits_is_always_equal 201411L
*/
#include <scoped_allocator>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <scoped_allocator> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <set> 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 <set>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <set> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <shared_mutex> feature macros
/* Constant Value
__cpp_lib_shared_mutex 201505L
__cpp_lib_shared_timed_mutex 201402L
*/
#include <shared_mutex>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <shared_mutex> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <string> 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 <string>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <string> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <string_view> feature macros
/* Constant Value
__cpp_lib_string_view 201606L
*/
#include <string_view>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <string_view> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <tuple> 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 <tuple>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <tuple> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <type_traits> 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 <type_traits>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <type_traits> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <unordered_map> 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 <unordered_map>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <unordered_map> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <unordered_set> feature macros
/* Constant Value
__cpp_lib_allocator_traits_is_always_equal 201411L
__cpp_lib_node_extract 201606L
__cpp_lib_nonmember_container_access 201411L
*/
#include <unordered_set>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <unordered_set> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <utility> 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 <utility>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <utility> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <variant> feature macros
/* Constant Value
__cpp_lib_variant 201606L
*/
#include <variant>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <variant> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <vector> 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 <vector>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <vector> 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
*/
}

View File

@@ -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.
//
//===----------------------------------------------------------------------===//
//
// <version> 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 <version>
#include "test_macros.h"
int main()
{
// ensure that the macros that are supposed to be defined in <version> 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
*/
}