summaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-09-12 19:41:40 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-09-12 19:41:40 +0000
commit861d2c7c13714587d93c460608c193373d95a658 (patch)
treecc921894390067b58c2a04c06c724acd16a2d5e1 /libcxx
parent5f49a5c493fe60ed2fd9bc5c8991dee4aa9ec312 (diff)
Implement the infrastructure for feature-test macros. Very few actual feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/algorithm1
-rw-r--r--libcxx/include/any1
-rw-r--r--libcxx/include/array1
-rw-r--r--libcxx/include/atomic5
-rw-r--r--libcxx/include/bit1
-rw-r--r--libcxx/include/chrono1
-rw-r--r--libcxx/include/cmath1
-rw-r--r--libcxx/include/complex1
-rw-r--r--libcxx/include/cstddef1
-rw-r--r--libcxx/include/deque1
-rw-r--r--libcxx/include/exception1
-rw-r--r--libcxx/include/filesystem5
-rw-r--r--libcxx/include/forward_list1
-rw-r--r--libcxx/include/functional3
-rw-r--r--libcxx/include/iomanip1
-rw-r--r--libcxx/include/iterator1
-rw-r--r--libcxx/include/list1
-rw-r--r--libcxx/include/map1
-rw-r--r--libcxx/include/memory1
-rw-r--r--libcxx/include/mutex1
-rw-r--r--libcxx/include/new1
-rw-r--r--libcxx/include/numeric1
-rw-r--r--libcxx/include/optional1
-rw-r--r--libcxx/include/regex1
-rw-r--r--libcxx/include/scoped_allocator1
-rw-r--r--libcxx/include/set1
-rw-r--r--libcxx/include/shared_mutex1
-rw-r--r--libcxx/include/string1
-rw-r--r--libcxx/include/string_view1
-rw-r--r--libcxx/include/tuple1
-rw-r--r--libcxx/include/type_traits2
-rw-r--r--libcxx/include/unordered_map1
-rw-r--r--libcxx/include/unordered_set1
-rw-r--r--libcxx/include/utility1
-rw-r--r--libcxx/include/variant1
-rw-r--r--libcxx/include/vector1
-rw-r--r--libcxx/include/version13
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp36
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp41
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp40
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp44
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp36
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp39
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp33
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp53
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp35
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp34
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp36
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp32
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp34
-rw-r--r--libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp135
77 files changed, 1535 insertions, 11 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 55e1f9fc113..1359fda53b5 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -646,6 +646,7 @@ template <class BidirectionalIterator, class Compare>
#include <iterator>
#include <cstddef>
#include <bit>
+#include <version>
#include <__debug>
diff --git a/libcxx/include/any b/libcxx/include/any
index e6e0b6ea695..e2945bdfa98 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -87,6 +87,7 @@ namespace std {
#include <typeinfo>
#include <type_traits>
#include <cstdlib>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/array b/libcxx/include/array
index ba4ff4260ed..8f4e111acbb 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -112,6 +112,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
#include <algorithm>
#include <stdexcept>
#include <cstdlib> // for _LIBCPP_UNREACHABLE
+#include <version>
#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/atomic b/libcxx/include/atomic
index 809f78a06d3..d37e7b4b035 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -544,6 +544,7 @@ void atomic_signal_fence(memory_order m) noexcept;
#include <cstddef>
#include <cstdint>
#include <type_traits>
+#include <version>
#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 <stdatomic.h>
#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/libcxx/include/bit b/libcxx/include/bit
index 5bf5214f330..db3812e5b5b 100644
--- a/libcxx/include/bit
+++ b/libcxx/include/bit
@@ -21,6 +21,7 @@ namespace std {
*/
#include <__config>
+#include <version>
#if defined(__IBMCPP__)
#include "support/ibm/support.h"
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index b9709b37365..0691101010f 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -798,6 +798,7 @@ constexpr chrono::year operator ""y(unsigned lo
#include <type_traits>
#include <ratio>
#include <limits>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/cmath b/libcxx/include/cmath
index ffb1c46c7b6..f5f62adcfb8 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -303,6 +303,7 @@ long double truncl(long double x);
#include <__config>
#include <math.h>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/complex b/libcxx/include/complex
index d692ee31920..8cf6a946d71 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -245,6 +245,7 @@ template<class T, class charT, class traits>
#include <stdexcept>
#include <cmath>
#include <sstream>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef
index b45dbe21df2..b4c42b19ddb 100644
--- a/libcxx/include/cstddef
+++ b/libcxx/include/cstddef
@@ -35,6 +35,7 @@ Types:
*/
#include <__config>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/deque b/libcxx/include/deque
index bfbd3a5ef54..414c7a85972 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -161,6 +161,7 @@ template <class T, class Allocator>
#include <iterator>
#include <algorithm>
#include <stdexcept>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/exception b/libcxx/include/exception
index b517486b5a8..7fd92798bff 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -81,6 +81,7 @@ template <class E> void rethrow_if_nested(const E& e);
#include <cstddef>
#include <cstdlib>
#include <type_traits>
+#include <version>
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
#include <vcruntime_exception.h>
diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem
index aa1d7180072..7547e6c5a69 100644
--- a/libcxx/include/filesystem
+++ b/libcxx/include/filesystem
@@ -244,6 +244,7 @@
#include <utility>
#include <iomanip> // for quoted
#include <string_view>
+#include <version>
#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/libcxx/include/forward_list b/libcxx/include/forward_list
index 571afdc925b..f9a71f0330a 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -177,6 +177,7 @@ template <class T, class Allocator>
#include <limits>
#include <iterator>
#include <algorithm>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/functional b/libcxx/include/functional
index b91fd75421f..41beb404bb8 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -487,6 +487,7 @@ POLICY: For non-variadic implementations, the number of arguments is limited
#include <memory>
#include <tuple>
#include <utility>
+#include <version>
#include <__functional_base>
@@ -2340,8 +2341,6 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
#if _LIBCPP_STD_VER > 14
-#define __cpp_lib_invoke 201411
-
template <class _Fn, class ..._Args>
result_of_t<_Fn&&(_Args&&...)>
invoke(_Fn&& __f, _Args&&... __args)
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip
index a6bee736f45..36c11167a44 100644
--- a/libcxx/include/iomanip
+++ b/libcxx/include/iomanip
@@ -46,6 +46,7 @@ template <class charT, class traits, class Allocator>
#include <__config>
#include <__string>
#include <istream>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/iterator b/libcxx/include/iterator
index 9415e0b8396..aed0525dbf8 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -418,6 +418,7 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <type_traits>
#include <cstddef>
#include <initializer_list>
+#include <version>
#ifdef __APPLE__
#include <Availability.h>
#endif
diff --git a/libcxx/include/list b/libcxx/include/list
index 49e2e1e1b48..8f0e1db1fed 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -181,6 +181,7 @@ template <class T, class Alloc>
#include <iterator>
#include <algorithm>
#include <type_traits>
+#include <version>
#include <__debug>
diff --git a/libcxx/include/map b/libcxx/include/map
index 4700a09eda2..cfd82805870 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -460,6 +460,7 @@ swap(multimap<Key, T, Compare, Allocator>& x,
#include <functional>
#include <initializer_list>
#include <type_traits>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/memory b/libcxx/include/memory
index de3f52d6ae4..276b3b763f8 100644
--- a/libcxx/include/memory
+++ b/libcxx/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 <atomic>
#endif
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index 52e39b0fb1f..9c55c7cc164 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -194,6 +194,7 @@ template<class Callable, class ...Args>
#ifndef _LIBCPP_CXX03_LANG
#include <tuple>
#endif
+#include <version>
#include <__threading_support>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/new b/libcxx/include/new
index d27ff298221..8d72ba5c880 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -91,6 +91,7 @@ void operator delete[](void* ptr, void*) noexcept;
#include <exception>
#include <type_traits>
#include <cstddef>
+#include <version>
#ifdef _LIBCPP_NO_EXCEPTIONS
#include <cstdlib>
#endif
diff --git a/libcxx/include/numeric b/libcxx/include/numeric
index 70ef173ea48..4e68239d059 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -142,6 +142,7 @@ template <class M, class N>
#include <iterator>
#include <limits> // for numeric_limits
#include <functional>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/optional b/libcxx/include/optional
index a76f8d18976..9ef0aac3999 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -156,6 +156,7 @@ template<class T>
#include <stdexcept>
#include <type_traits>
#include <utility>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/regex b/libcxx/include/regex
index dcdb14af9af..db15f78e410 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -769,6 +769,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#include <memory>
#include <vector>
#include <deque>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index 4760d946def..bdbb0136b5c 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -108,6 +108,7 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
#include <__config>
#include <memory>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/set b/libcxx/include/set
index 108a9e97f88..f2ce6ea2f36 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -402,6 +402,7 @@ swap(multiset<Key, Compare, Allocator>& x, multiset<Key, Compare, Allocator>& y)
#include <__tree>
#include <__node_handle>
#include <functional>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index a7735d6732c..fbde0cf137a 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -124,6 +124,7 @@ template <class Mutex>
*/
#include <__config>
+#include <version>
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
diff --git a/libcxx/include/string b/libcxx/include/string
index 162e54058c4..c79164cb232 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -510,6 +510,7 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
#include <type_traits>
#include <initializer_list>
#include <__functional_base>
+#include <version>
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#include <cstdint>
#endif
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index 6377aeb6d64..55dce7271b4 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -178,6 +178,7 @@ namespace std {
#include <iterator>
#include <limits>
#include <stdexcept>
+#include <version>
#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index b3a17e7b735..fb5428ec1c3 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -141,6 +141,7 @@ template <class... Types>
#include <type_traits>
#include <__functional_base>
#include <utility>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index e413d2656e3..7ff67bfdb73 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -404,6 +404,7 @@ namespace std
*/
#include <__config>
#include <cstddef>
+#include <version>
#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 <class...> using void_t = void;
# ifndef _LIBCPP_HAS_NO_VARIADICS
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index 348f57923b5..fc3cfb6a950 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -386,6 +386,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
#include <functional>
#include <stdexcept>
#include <tuple>
+#include <version>
#include <__debug>
diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index 9b8560da494..a219fa60912 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -338,6 +338,7 @@ template <class Value, class Hash, class Pred, class Alloc>
#include <__hash_table>
#include <__node_handle>
#include <functional>
+#include <version>
#include <__debug>
diff --git a/libcxx/include/utility b/libcxx/include/utility
index ed9bf030d49..570ec05ae81 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -203,6 +203,7 @@ template <size_t I>
#include <cstddef>
#include <cstring>
#include <cstdint>
+#include <version>
#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 6c7dca21588..6a523569e20 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -208,6 +208,7 @@ namespace std {
#include <type_traits>
#include <utility>
#include <limits>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 9245ba18ce9..e7aaa4df6c0 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -276,6 +276,7 @@ void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
#include <stdexcept>
#include <algorithm>
#include <cstring>
+#include <version>
#include <__split_buffer>
#include <__functional_base>
diff --git a/libcxx/include/version b/libcxx/include/version
index 6d10411484e..80c27971f02 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -101,4 +101,17 @@ __cpp_lib_void_t 201411L <type_traits>
#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/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp
new file mode 100644
index 00000000000..37a636f3239
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp
new file mode 100644
index 00000000000..951afbc0877
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp
new file mode 100644
index 00000000000..548abe6480c
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp
new file mode 100644
index 00000000000..032ec269e56
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp
new file mode 100644
index 00000000000..2dfe4a8b103
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp
new file mode 100644
index 00000000000..5d1755ba7c4
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp
new file mode 100644
index 00000000000..e8479d1c858
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
new file mode 100644
index 00000000000..dd64efb11bb
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp
new file mode 100644
index 00000000000..06f244834bd
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp
new file mode 100644
index 00000000000..ac8dfbb0476
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp
new file mode 100644
index 00000000000..faa9063f4cb
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp
new file mode 100644
index 00000000000..a77ce5f1c7d
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp
new file mode 100644
index 00000000000..4cc630733c0
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
new file mode 100644
index 00000000000..46ad17d75c1
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp
new file mode 100644
index 00000000000..b262d70dd95
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp
new file mode 100644
index 00000000000..a24de49f3ae
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp
new file mode 100644
index 00000000000..35ed34b5071
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp
new file mode 100644
index 00000000000..02e0286495d
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp
new file mode 100644
index 00000000000..ad666d152d5
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp
new file mode 100644
index 00000000000..933449ce5fa
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
new file mode 100644
index 00000000000..5dbd6ab5f9b
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
new file mode 100644
index 00000000000..30c27233b27
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp
new file mode 100644
index 00000000000..1909b31a162
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp
new file mode 100644
index 00000000000..6daca346faf
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp
new file mode 100644
index 00000000000..fbe100ba82a
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp
new file mode 100644
index 00000000000..b78eda6049f
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp
new file mode 100644
index 00000000000..91222ce64e2
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp
new file mode 100644
index 00000000000..c4306918624
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp
new file mode 100644
index 00000000000..dc414f0fd90
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp
new file mode 100644
index 00000000000..c12ebabb3c9
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp
new file mode 100644
index 00000000000..2b755b691ed
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp
new file mode 100644
index 00000000000..53e76821bcd
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp
new file mode 100644
index 00000000000..921b8ae93aa
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp
new file mode 100644
index 00000000000..9f7ecedb556
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp
new file mode 100644
index 00000000000..cf01b4afc80
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp
new file mode 100644
index 00000000000..b8e70636c9a
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp
new file mode 100644
index 00000000000..e67cb94d87e
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp
new file mode 100644
index 00000000000..75f228ba9e3
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp
new file mode 100644
index 00000000000..f033d447639
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
new file mode 100644
index 00000000000..5bc7f9aa0d5
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+//
+// <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
+*/
+}