diff --git a/include/experimental/chrono b/include/experimental/chrono index ca9e5f852..591cf7160 100644 --- a/include/experimental/chrono +++ b/include/experimental/chrono @@ -8,52 +8,4 @@ // //===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_CHRONO -#define _LIBCPP_EXPERIMENTAL_CHRONO - -/** - experimental/chrono synopsis - -// C++1y - -#include - -namespace std { -namespace chrono { -namespace experimental { -inline namespace fundamentals_v1 { - - // See C++14 20.12.4, customization traits - template constexpr bool treat_as_floating_point_v - = treat_as_floating_point::value; - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace chrono -} // namespace std - - */ - -#include -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - -#if _LIBCPP_STD_VER > 11 - -_LIBCPP_BEGIN_NAMESPACE_CHRONO_LFTS - -#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES - -template _LIBCPP_CONSTEXPR bool treat_as_floating_point_v - = treat_as_floating_point<_Rep>::value; - -#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */ - -_LIBCPP_END_NAMESPACE_CHRONO_LFTS - -#endif /* _LIBCPP_STD_VER > 11 */ - -#endif /* _LIBCPP_EXPERIMENTAL_CHRONO */ +#error " has been removed. Use instead." diff --git a/include/experimental/ratio b/include/experimental/ratio index 757f24e08..9c2bf2e46 100644 --- a/include/experimental/ratio +++ b/include/experimental/ratio @@ -8,70 +8,4 @@ // //===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_RATIO -#define _LIBCPP_EXPERIMENTAL_RATIO - -/** - experimental/ratio synopsis - C++1y -#include - -namespace std { -namespace experimental { -inline namespace fundamentals_v1 { - - // See C++14 20.11.5, ratio comparison - template constexpr bool ratio_equal_v - = ratio_equal::value; - template constexpr bool ratio_not_equal_v - = ratio_not_equal::value; - template constexpr bool ratio_less_v - = ratio_less::value; - template constexpr bool ratio_less_equal_v - = ratio_less_equal::value; - template constexpr bool ratio_greater_v - = ratio_greater::value; - template constexpr bool ratio_greater_equal_v - = ratio_greater_equal::value; - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace std - -*/ - -#include - -#if _LIBCPP_STD_VER > 11 - -#include - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES - -template _LIBCPP_CONSTEXPR bool ratio_equal_v - = ratio_equal<_R1, _R2>::value; - -template _LIBCPP_CONSTEXPR bool ratio_not_equal_v - = ratio_not_equal<_R1, _R2>::value; - -template _LIBCPP_CONSTEXPR bool ratio_less_v - = ratio_less<_R1, _R2>::value; - -template _LIBCPP_CONSTEXPR bool ratio_less_equal_v - = ratio_less_equal<_R1, _R2>::value; - -template _LIBCPP_CONSTEXPR bool ratio_greater_v - = ratio_greater<_R1, _R2>::value; - -template _LIBCPP_CONSTEXPR bool ratio_greater_equal_v - = ratio_greater_equal<_R1, _R2>::value; - -#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */ - -_LIBCPP_END_NAMESPACE_LFTS - -#endif /* _LIBCPP_STD_VER > 11 */ - -#endif // _LIBCPP_EXPERIMENTAL_RATIO +#error " has been removed. Use instead." diff --git a/include/experimental/system_error b/include/experimental/system_error index 2ec238544..7937357fa 100644 --- a/include/experimental/system_error +++ b/include/experimental/system_error @@ -8,56 +8,4 @@ // //===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR -#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR - -/** - experimental/system_error synopsis - -// C++1y - -#include - -namespace std { -namespace experimental { -inline namespace fundamentals_v1 { - - // See C++14 19.5, System error support - template constexpr bool is_error_code_enum_v - = is_error_code_enum::value; - template constexpr bool is_error_condition_enum_v - = is_error_condition_enum::value; - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace std - -*/ - -#include - -#if _LIBCPP_STD_VER > 11 - -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES - -template _LIBCPP_CONSTEXPR bool is_error_code_enum_v - = is_error_code_enum<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_error_condition_enum_v - = is_error_condition_enum<_Tp>::value; - -#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */ - -_LIBCPP_END_NAMESPACE_LFTS - -#endif /* _LIBCPP_STD_VER > 11 */ - -#endif /* _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR */ +#error " has been removed. Use instead." diff --git a/include/experimental/tuple b/include/experimental/tuple index e00d2ec1a..1f37a6293 100644 --- a/include/experimental/tuple +++ b/include/experimental/tuple @@ -8,75 +8,4 @@ // //===----------------------------------------------------------------------===// -#ifndef _LIBCPP_EXPERIMENTAL_TUPLE -#define _LIBCPP_EXPERIMENTAL_TUPLE - -/* - experimental/tuple synopsis - -// C++1y - -#include - -namespace std { -namespace experimental { -inline namespace fundamentals_v1 { - - // See C++14 20.4.2.5, tuple helper classes - template constexpr size_t tuple_size_v - = tuple_size::value; - - // 3.2.2, Calling a function with a tuple of arguments - template - constexpr decltype(auto) apply(F&& f, Tuple&& t); - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace std - - */ - -# include - -#if _LIBCPP_STD_VER > 11 - -# include -# include -# include <__functional_base> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES -template -_LIBCPP_CONSTEXPR size_t tuple_size_v = tuple_size<_Tp>::value; -#endif - -template -inline _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR_AFTER_CXX11 -decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t, - integer_sequence) { - return _VSTD::__invoke_constexpr( - _VSTD::forward<_Fn>(__f), - _VSTD::get<_Id>(_VSTD::forward<_Tuple>(__t))... - ); -} - -template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 -decltype(auto) apply(_Fn && __f, _Tuple && __t) { - return _VSTD_LFTS::__apply_tuple_impl( - _VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t), - make_index_sequence::type>::value>() - ); -} - -_LIBCPP_END_NAMESPACE_LFTS - -#endif /* _LIBCPP_STD_VER > 11 */ - -#endif /* _LIBCPP_EXPERIMENTAL_TUPLE */ +#error " has been removed. Use instead." diff --git a/include/experimental/type_traits b/include/experimental/type_traits index 3a7593620..afe491567 100644 --- a/include/experimental/type_traits +++ b/include/experimental/type_traits @@ -21,146 +21,6 @@ namespace std { namespace experimental { inline namespace fundamentals_v1 { - // See C++14 20.10.4.1, primary type categories - template constexpr bool is_void_v - = is_void::value; - template constexpr bool is_null_pointer_v - = is_null_pointer::value; - template constexpr bool is_integral_v - = is_integral::value; - template constexpr bool is_floating_point_v - = is_floating_point::value; - template constexpr bool is_array_v - = is_array::value; - template constexpr bool is_pointer_v - = is_pointer::value; - template constexpr bool is_lvalue_reference_v - = is_lvalue_reference::value; - template constexpr bool is_rvalue_reference_v - = is_rvalue_reference::value; - template constexpr bool is_member_object_pointer_v - = is_member_object_pointer::value; - template constexpr bool is_member_function_pointer_v - = is_member_function_pointer::value; - template constexpr bool is_enum_v - = is_enum::value; - template constexpr bool is_union_v - = is_union::value; - template constexpr bool is_class_v - = is_class::value; - template constexpr bool is_function_v - = is_function::value; - - // See C++14 20.10.4.2, composite type categories - template constexpr bool is_reference_v - = is_reference::value; - template constexpr bool is_arithmetic_v - = is_arithmetic::value; - template constexpr bool is_fundamental_v - = is_fundamental::value; - template constexpr bool is_object_v - = is_object::value; - template constexpr bool is_scalar_v - = is_scalar::value; - template constexpr bool is_compound_v - = is_compound::value; - template constexpr bool is_member_pointer_v - = is_member_pointer::value; - - // See C++14 20.10.4.3, type properties - template constexpr bool is_const_v - = is_const::value; - template constexpr bool is_volatile_v - = is_volatile::value; - template constexpr bool is_trivial_v - = is_trivial::value; - template constexpr bool is_trivially_copyable_v - = is_trivially_copyable::value; - template constexpr bool is_standard_layout_v - = is_standard_layout::value; - template constexpr bool is_pod_v - = is_pod::value; - template constexpr bool is_literal_type_v - = is_literal_type::value; - template constexpr bool is_empty_v - = is_empty::value; - template constexpr bool is_polymorphic_v - = is_polymorphic::value; - template constexpr bool is_abstract_v - = is_abstract::value; - template constexpr bool is_final_v - = is_final::value; - template constexpr bool is_signed_v - = is_signed::value; - template constexpr bool is_unsigned_v - = is_unsigned::value; - template constexpr bool is_constructible_v - = is_constructible::value; - template constexpr bool is_default_constructible_v - = is_default_constructible::value; - template constexpr bool is_copy_constructible_v - = is_copy_constructible::value; - template constexpr bool is_move_constructible_v - = is_move_constructible::value; - template constexpr bool is_assignable_v - = is_assignable::value; - template constexpr bool is_copy_assignable_v - = is_copy_assignable::value; - template constexpr bool is_move_assignable_v - = is_move_assignable::value; - template constexpr bool is_destructible_v - = is_destructible::value; - template constexpr bool is_trivially_constructible_v - = is_trivially_constructible::value; - template constexpr bool is_trivially_default_constructible_v - = is_trivially_default_constructible::value; - template constexpr bool is_trivially_copy_constructible_v - = is_trivially_copy_constructible::value; - template constexpr bool is_trivially_move_constructible_v - = is_trivially_move_constructible::value; - template constexpr bool is_trivially_assignable_v - = is_trivially_assignable::value; - template constexpr bool is_trivially_copy_assignable_v - = is_trivially_copy_assignable::value; - template constexpr bool is_trivially_move_assignable_v - = is_trivially_move_assignable::value; - template constexpr bool is_trivially_destructible_v - = is_trivially_destructible::value; - template constexpr bool is_nothrow_constructible_v - = is_nothrow_constructible::value; - template constexpr bool is_nothrow_default_constructible_v - = is_nothrow_default_constructible::value; - template constexpr bool is_nothrow_copy_constructible_v - = is_nothrow_copy_constructible::value; - template constexpr bool is_nothrow_move_constructible_v - = is_nothrow_move_constructible::value; - template constexpr bool is_nothrow_assignable_v - = is_nothrow_assignable::value; - template constexpr bool is_nothrow_copy_assignable_v - = is_nothrow_copy_assignable::value; - template constexpr bool is_nothrow_move_assignable_v - = is_nothrow_move_assignable::value; - template constexpr bool is_nothrow_destructible_v - = is_nothrow_destructible::value; - template constexpr bool has_virtual_destructor_v - = has_virtual_destructor::value; - - // See C++14 20.10.5, type property queries - template constexpr size_t alignment_of_v - = alignment_of::value; - template constexpr size_t rank_v - = rank::value; - template constexpr size_t extent_v - = extent::value; - - // See C++14 20.10.6, type relations - template constexpr bool is_same_v - = is_same::value; - template constexpr bool is_base_of_v - = is_base_of::value; - template constexpr bool is_convertible_v - = is_convertible::value; - // 3.3.2, Other type transformations template class invocation_type; // not defined template class invocation_type; @@ -172,14 +32,6 @@ inline namespace fundamentals_v1 { template using raw_invocation_type_t = typename raw_invocation_type::type; - // 3.3.3, Logical operator traits - template struct conjunction; - template constexpr bool conjunction_v = conjunction::value; - template struct disjunction; - template constexpr bool disjunction_v = disjunction::value; - template struct negation; - template constexpr bool negation_v = negation::value; - // 3.3.4, Detection idiom template using void_t = void; @@ -229,215 +81,6 @@ inline namespace fundamentals_v1 { _LIBCPP_BEGIN_NAMESPACE_LFTS -#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES - -// C++14 20.10.4.1, primary type categories - -template _LIBCPP_CONSTEXPR bool is_void_v - = is_void<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_null_pointer_v - = is_null_pointer<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_integral_v - = is_integral<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_floating_point_v - = is_floating_point<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_array_v - = is_array<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_pointer_v - = is_pointer<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_lvalue_reference_v - = is_lvalue_reference<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_rvalue_reference_v - = is_rvalue_reference<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_member_object_pointer_v - = is_member_object_pointer<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_member_function_pointer_v - = is_member_function_pointer<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_enum_v - = is_enum<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_union_v - = is_union<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_class_v - = is_class<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_function_v - = is_function<_Tp>::value; - -// C++14 20.10.4.2, composite type categories - -template _LIBCPP_CONSTEXPR bool is_reference_v - = is_reference<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_arithmetic_v - = is_arithmetic<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_fundamental_v - = is_fundamental<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_object_v - = is_object<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_scalar_v - = is_scalar<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_compound_v - = is_compound<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_member_pointer_v - = is_member_pointer<_Tp>::value; - -// C++14 20.10.4.3, type properties - -template _LIBCPP_CONSTEXPR bool is_const_v - = is_const<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_volatile_v - = is_volatile<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivial_v - = is_trivial<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_copyable_v - = is_trivially_copyable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_standard_layout_v - = is_standard_layout<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_pod_v - = is_pod<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_literal_type_v - = is_literal_type<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_empty_v - = is_empty<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_polymorphic_v - = is_polymorphic<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_abstract_v - = is_abstract<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_final_v - = is_final<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_signed_v - = is_signed<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_unsigned_v - = is_unsigned<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_constructible_v - = is_constructible<_Tp, _Ts...>::value; - -template _LIBCPP_CONSTEXPR bool is_default_constructible_v - = is_default_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_copy_constructible_v - = is_copy_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_move_constructible_v - = is_move_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_assignable_v - = is_assignable<_Tp, _Up>::value; - -template _LIBCPP_CONSTEXPR bool is_copy_assignable_v - = is_copy_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_move_assignable_v - = is_move_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_destructible_v - = is_destructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_constructible_v - = is_trivially_constructible<_Tp, _Ts...>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v - = is_trivially_default_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v - = is_trivially_copy_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v - = is_trivially_move_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_assignable_v - = is_trivially_assignable<_Tp, _Up>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v - = is_trivially_copy_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v - = is_trivially_move_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_trivially_destructible_v - = is_trivially_destructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v - = is_nothrow_constructible<_Tp, _Ts...>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v - = is_nothrow_default_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v - = is_nothrow_copy_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v - = is_nothrow_move_constructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v - = is_nothrow_assignable<_Tp, _Up>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v - = is_nothrow_copy_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v - = is_nothrow_move_assignable<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v - = is_nothrow_destructible<_Tp>::value; - -template _LIBCPP_CONSTEXPR bool has_virtual_destructor_v - = has_virtual_destructor<_Tp>::value; - -// C++14 20.10.5, type properties queries - -template _LIBCPP_CONSTEXPR size_t alignment_of_v - = alignment_of<_Tp>::value; - -template _LIBCPP_CONSTEXPR size_t rank_v - = rank<_Tp>::value; - -template _LIBCPP_CONSTEXPR size_t extent_v - = extent<_Tp, _Id>::value; - -// C++14 20.10.6, type relations - -template _LIBCPP_CONSTEXPR bool is_same_v - = is_same<_Tp, _Up>::value; - -template _LIBCPP_CONSTEXPR bool is_base_of_v - = is_base_of<_Tp, _Up>::value; - -template _LIBCPP_CONSTEXPR bool is_convertible_v - = is_convertible<_Tp, _Up>::value; - -#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */ - // 3.3.2, Other type transformations /* template @@ -459,24 +102,6 @@ template using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type; */ -// 3.3.3, Logical operator traits -template using void_t = void; - -template -struct conjunction : _VSTD::__and_<_Args...> {}; -template -_LIBCPP_CONSTEXPR bool conjunction_v = conjunction<_Args...>::value; - -template -struct disjunction : _VSTD::__or_<_Args...> {}; -template -_LIBCPP_CONSTEXPR bool disjunction_v = disjunction<_Args...>::value; - -template -struct negation : _VSTD::__not_<_Tp> {}; -template -_LIBCPP_CONSTEXPR bool negation_v = negation<_Tp>::value; - // 3.3.4, Detection idiom template using void_t = void; diff --git a/include/module.modulemap b/include/module.modulemap index 9775447ec..076ef2334 100644 --- a/include/module.modulemap +++ b/include/module.modulemap @@ -492,10 +492,6 @@ module std [system] { module algorithm { header "experimental/algorithm" export * - } - module chrono { - header "experimental/chrono" - export * } module coroutine { requires coroutines @@ -542,10 +538,6 @@ module std [system] { header "experimental/propagate_const" export * } - module ratio { - header "experimental/ratio" - export * - } module regex { header "experimental/regex" export * @@ -558,14 +550,6 @@ module std [system] { header "experimental/string" export * } - module system_error { - header "experimental/system_error" - export * - } - module tuple { - header "experimental/tuple" - export * - } module type_traits { header "experimental/type_traits" export * diff --git a/test/libcxx/double_include.sh.cpp b/test/libcxx/double_include.sh.cpp index d10849eb4..462c685e5 100644 --- a/test/libcxx/double_include.sh.cpp +++ b/test/libcxx/double_include.sh.cpp @@ -135,7 +135,6 @@ // experimental headers #if __cplusplus >= 201103L #include -#include #if defined(__cpp_coroutines) #include #endif @@ -149,12 +148,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/test/libcxx/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp b/test/libcxx/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp deleted file mode 100644 index ea7ef6cbc..000000000 --- a/test/libcxx/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -// Test that is included. - -#include - -#ifndef _LIBCPP_RATIO -# error " must include " -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/ratio/version.pass.cpp b/test/libcxx/experimental/utilities/ratio/version.pass.cpp deleted file mode 100644 index 8bc583fb6..000000000 --- a/test/libcxx/experimental/utilities/ratio/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp b/test/libcxx/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp deleted file mode 100644 index be3aacdc3..000000000 --- a/test/libcxx/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -#ifndef _LIBCPP_SYSTEM_ERROR -# error " must include " -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/syserror/version.pass.cpp b/test/libcxx/experimental/utilities/syserror/version.pass.cpp deleted file mode 100644 index 35f6a59c3..000000000 --- a/test/libcxx/experimental/utilities/syserror/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/time/header.chrono.synop/includes.pass.cpp b/test/libcxx/experimental/utilities/time/header.chrono.synop/includes.pass.cpp deleted file mode 100644 index e91068c74..000000000 --- a/test/libcxx/experimental/utilities/time/header.chrono.synop/includes.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -#ifndef _LIBCPP_CHRONO -# error " must include " -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/time/version.pass.cpp b/test/libcxx/experimental/utilities/time/version.pass.cpp deleted file mode 100644 index be97466f3..000000000 --- a/test/libcxx/experimental/utilities/time/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/libcxx/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp b/test/libcxx/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp deleted file mode 100644 index defa454d6..000000000 --- a/test/libcxx/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -int main() -{ -#ifndef _LIBCPP_TUPLE -# error " must include " -#endif -} diff --git a/test/libcxx/experimental/utilities/tuple/version.pass.cpp b/test/libcxx/experimental/utilities/tuple/version.pass.cpp deleted file mode 100644 index 5a3fd2e39..000000000 --- a/test/libcxx/experimental/utilities/tuple/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/libcxx/min_max_macros.sh.cpp b/test/libcxx/min_max_macros.sh.cpp index f245d35c4..087aa3645 100644 --- a/test/libcxx/min_max_macros.sh.cpp +++ b/test/libcxx/min_max_macros.sh.cpp @@ -237,8 +237,6 @@ TEST_MACROS(); #if __cplusplus >= 201103L #include TEST_MACROS(); -#include -TEST_MACROS(); #include TEST_MACROS(); #include @@ -259,18 +257,12 @@ TEST_MACROS(); TEST_MACROS(); #include TEST_MACROS(); -#include -TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); -#include -TEST_MACROS(); -#include -TEST_MACROS(); #include TEST_MACROS(); #include diff --git a/test/std/experimental/utilities/meta/meta.logical/conjunction.pass.cpp b/test/std/experimental/utilities/meta/meta.logical/conjunction.pass.cpp deleted file mode 100644 index cb8db1feb..000000000 --- a/test/std/experimental/utilities/meta/meta.logical/conjunction.pass.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -// template struct conjunction; // C++17 -// template -// constexpr bool conjunction_v = conjunction::value; // C++17 - -#include -#include - -namespace ex = std::experimental; - -struct True { static constexpr bool value = true; }; -struct False { static constexpr bool value = false; }; - -int main() -{ - static_assert ( ex::conjunction<>::value, "" ); - static_assert ( ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - - static_assert ( ex::conjunction_v<>, "" ); - static_assert ( ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - - static_assert ( ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - - static_assert ( ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - - static_assert ( ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - - static_assert ( ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); - - static_assert ( ex::conjunction::value, "" ); - static_assert (!ex::conjunction::value, "" ); - - static_assert ( ex::conjunction_v, "" ); - static_assert (!ex::conjunction_v, "" ); -} diff --git a/test/std/experimental/utilities/meta/meta.logical/disjunction.pass.cpp b/test/std/experimental/utilities/meta/meta.logical/disjunction.pass.cpp deleted file mode 100644 index dcdbf09fb..000000000 --- a/test/std/experimental/utilities/meta/meta.logical/disjunction.pass.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -// template struct disjunction; -// template -// constexpr bool disjunction_v = disjunction::value; - -#include -#include - -namespace ex = std::experimental; - -struct True { static constexpr bool value = true; }; -struct False { static constexpr bool value = false; }; - -int main() -{ - static_assert (!ex::disjunction<>::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert (!ex::disjunction::value, "" ); - - static_assert (!ex::disjunction_v<>, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert (!ex::disjunction_v, "" ); - - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert (!ex::disjunction::value, "" ); - - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert (!ex::disjunction_v, "" ); - - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert ( ex::disjunction::value, "" ); - static_assert (!ex::disjunction::value, "" ); - - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert ( ex::disjunction_v, "" ); - static_assert (!ex::disjunction_v, "" ); - - static_assert ( ex::disjunction::value, "" ); - static_assert (!ex::disjunction::value, "" ); - - static_assert ( ex::disjunction_v, "" ); - static_assert (!ex::disjunction_v, "" ); -} diff --git a/test/std/experimental/utilities/meta/meta.logical/negation.pass.cpp b/test/std/experimental/utilities/meta/meta.logical/negation.pass.cpp deleted file mode 100644 index b0d43d7e5..000000000 --- a/test/std/experimental/utilities/meta/meta.logical/negation.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -// template struct negation; -// template -// constexpr bool negation_v = negation::value; - -#include -#include - -namespace ex = std::experimental; - -struct True { static constexpr bool value = true; }; -struct False { static constexpr bool value = false; }; - -int main() -{ - static_assert (!ex::negation::value, "" ); - static_assert ( ex::negation::value, "" ); - - static_assert (!ex::negation_v, "" ); - static_assert ( ex::negation_v, "" ); - - static_assert (!ex::negation::value, "" ); - static_assert ( ex::negation::value, "" ); - - static_assert (!ex::negation_v, "" ); - static_assert ( ex::negation_v, "" ); - - static_assert ( ex::negation>::value, "" ); - static_assert (!ex::negation>::value, "" ); -} diff --git a/test/std/experimental/utilities/meta/meta.type.synop/includes.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/includes.pass.cpp deleted file mode 100644 index ddc82cb54..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/includes.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -#ifndef _LIBCPP_TYPE_TRAITS -# error " must include " -#endif - -int main() -{ -} diff --git a/test/std/experimental/utilities/meta/meta.type.synop/meta.rel.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/meta.rel.pass.cpp deleted file mode 100644 index 8edc91730..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/meta.rel.pass.cpp +++ /dev/null @@ -1,62 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -namespace ex = std::experimental; - -struct base_type {}; -struct derived_type : base_type {}; - -int main() -{ - { - typedef int T; - typedef int U; - static_assert(ex::is_same_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_same_v == std::is_same::value, ""); - } - { - typedef int T; - typedef long U; - static_assert(!ex::is_same_v, ""); - static_assert(ex::is_same_v == std::is_same::value, ""); - } - { - typedef base_type T; - typedef derived_type U; - static_assert(ex::is_base_of_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_base_of_v == std::is_base_of::value, ""); - } - { - typedef int T; - typedef int U; - static_assert(!ex::is_base_of_v, ""); - static_assert(ex::is_base_of_v == std::is_base_of::value, ""); - } - { - typedef int T; - typedef long U; - static_assert(ex::is_convertible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_convertible_v == std::is_convertible::value, ""); - } - { - typedef void T; - typedef int U; - static_assert(!ex::is_convertible_v, ""); - static_assert(ex::is_convertible_v == std::is_convertible::value, ""); - } -} - diff --git a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.cat.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.cat.pass.cpp deleted file mode 100644 index a4a91c136..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.cat.pass.cpp +++ /dev/null @@ -1,178 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -namespace ex = std::experimental; - -struct class_type {}; -enum enum_type {}; -union union_type {}; - -int main() -{ - { - typedef void T; - static_assert(ex::is_void_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_void_v == std::is_void::value, ""); - } - { - typedef int T; - static_assert(!ex::is_void_v, ""); - static_assert(ex::is_void_v == std::is_void::value, ""); - } - { - typedef decltype(nullptr) T; - static_assert(ex::is_null_pointer_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_null_pointer_v == std::is_null_pointer::value, ""); - } - { - typedef int T; - static_assert(!ex::is_null_pointer_v, ""); - static_assert(ex::is_null_pointer_v == std::is_null_pointer::value, ""); - } - { - typedef int T; - static_assert(ex::is_integral_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_integral_v == std::is_integral::value, ""); - } - { - typedef void T; - static_assert(!ex::is_integral_v, ""); - static_assert(ex::is_integral_v == std::is_integral::value, ""); - } - { - typedef float T; - static_assert(ex::is_floating_point_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_floating_point_v == std::is_floating_point::value, ""); - } - { - typedef int T; - static_assert(!ex::is_floating_point_v, ""); - static_assert(ex::is_floating_point_v == std::is_floating_point::value, ""); - } - { - typedef int(T)[42]; - static_assert(ex::is_array_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_array_v == std::is_array::value, ""); - } - { - typedef int T; - static_assert(!ex::is_array_v, ""); - static_assert(ex::is_array_v == std::is_array::value, ""); - } - { - typedef void* T; - static_assert(ex::is_pointer_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_pointer_v == std::is_pointer::value, ""); - } - { - typedef int T; - static_assert(!ex::is_pointer_v, ""); - static_assert(ex::is_pointer_v == std::is_pointer::value, ""); - } - { - typedef int & T; - static_assert(ex::is_lvalue_reference_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_lvalue_reference_v == std::is_lvalue_reference::value, ""); - } - { - typedef int T; - static_assert(!ex::is_lvalue_reference_v, ""); - static_assert(ex::is_lvalue_reference_v == std::is_lvalue_reference::value, ""); - } - { - typedef int && T; - static_assert(ex::is_rvalue_reference_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_rvalue_reference_v == std::is_rvalue_reference::value, ""); - } - { - typedef int T; - static_assert(!ex::is_rvalue_reference_v, ""); - static_assert(ex::is_rvalue_reference_v == std::is_rvalue_reference::value, ""); - } - { - typedef int class_type::*T; - static_assert(ex::is_member_object_pointer_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_member_object_pointer_v == std::is_member_object_pointer::value, ""); - } - { - typedef int T; - static_assert(!ex::is_member_object_pointer_v, ""); - static_assert(ex::is_member_object_pointer_v == std::is_member_object_pointer::value, ""); - } - { - typedef void(class_type::*T)(); - static_assert(ex::is_member_function_pointer_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_member_function_pointer_v == std::is_member_function_pointer::value, ""); - } - { - typedef int T; - static_assert(!ex::is_member_function_pointer_v, ""); - static_assert(ex::is_member_function_pointer_v == std::is_member_function_pointer::value, ""); - } - { - typedef enum_type T; - static_assert(ex::is_enum_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_enum_v == std::is_enum::value, ""); - } - { - typedef int T; - static_assert(!ex::is_enum_v, ""); - static_assert(ex::is_enum_v == std::is_enum::value, ""); - } - { - typedef union_type T; - static_assert(ex::is_union_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_union_v == std::is_union::value, ""); - } - { - typedef int T; - static_assert(!ex::is_union_v, ""); - static_assert(ex::is_union_v == std::is_union::value, ""); - } - { - typedef class_type T; - static_assert(ex::is_class_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_class_v == std::is_class::value, ""); - } - { - typedef int T; - static_assert(!ex::is_class_v, ""); - static_assert(ex::is_class_v == std::is_class::value, ""); - } - { - typedef void(T)(); - static_assert(ex::is_function_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_function_v == std::is_function::value, ""); - } - { - typedef int T; - static_assert(!ex::is_function_v, ""); - static_assert(ex::is_function_v == std::is_function::value, ""); - } -} - diff --git a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.comp.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.comp.pass.cpp deleted file mode 100644 index b3927b120..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.comp.pass.cpp +++ /dev/null @@ -1,99 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -namespace ex = std::experimental; - -struct class_type {}; - -int main() -{ - { - typedef int & T; - static_assert(ex::is_reference_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_reference_v == std::is_reference::value, ""); - } - { - typedef int T; - static_assert(!ex::is_reference_v, ""); - static_assert(ex::is_reference_v == std::is_reference::value, ""); - } - { - typedef int T; - static_assert(ex::is_arithmetic_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_arithmetic_v == std::is_arithmetic::value, ""); - } - { - typedef void* T; - static_assert(!ex::is_arithmetic_v, ""); - static_assert(ex::is_arithmetic_v == std::is_arithmetic::value, ""); - } - { - typedef int T; - static_assert(ex::is_fundamental_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_fundamental_v == std::is_fundamental::value, ""); - } - { - typedef class_type T; - static_assert(!ex::is_fundamental_v, ""); - static_assert(ex::is_fundamental_v == std::is_fundamental::value, ""); - } - { - typedef class_type T; - static_assert(ex::is_object_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_object_v == std::is_object::value, ""); - } - { - typedef void T; - static_assert(!ex::is_object_v, ""); - static_assert(ex::is_object_v == std::is_object::value, ""); - } - { - typedef int T; - static_assert(ex::is_scalar_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_scalar_v == std::is_scalar::value, ""); - } - { - typedef void T; - static_assert(!ex::is_scalar_v, ""); - static_assert(ex::is_scalar_v == std::is_scalar::value, ""); - } - { - typedef void* T; - static_assert(ex::is_compound_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_compound_v == std::is_compound::value, ""); - } - { - typedef void T; - static_assert(!ex::is_compound_v, ""); - static_assert(ex::is_compound_v == std::is_compound::value, ""); - } - { - typedef int class_type::*T; - static_assert(ex::is_member_pointer_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_member_pointer_v == std::is_member_pointer::value, ""); - } - { - typedef int T; - static_assert(!ex::is_member_pointer_v, ""); - static_assert(ex::is_member_pointer_v == std::is_member_pointer::value, ""); - } -} - diff --git a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp deleted file mode 100644 index bfd385a1b..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp +++ /dev/null @@ -1,492 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// GCC returns true for __is_trivially_constructible(void, int) -// See gcc.gnu.org/PR80682 -// NOTE: This has been fixed in trunk and will be backported soon. -// XFAIL: gcc-7, gcc-6, gcc-5, gcc-4 - -// - -#include - -namespace ex = std::experimental; - -struct non_literal_type { non_literal_type() {} }; -struct empty_type {}; - -struct polymorphic_type -{ - virtual void foo() {} -}; - -struct abstract_type -{ - virtual void foo() = 0; -}; - -struct final_type final {}; - -struct virtual_dtor_type -{ - virtual ~virtual_dtor_type() {} -}; - -void type_properties_test() -{ - { - typedef const int T; - static_assert(ex::is_const_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_const_v == std::is_const::value, ""); - } - { - typedef int T; - static_assert(!ex::is_const_v, ""); - static_assert(ex::is_const_v == std::is_const::value, ""); - } - { - typedef volatile int T; - static_assert(ex::is_volatile_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_volatile_v == std::is_volatile::value, ""); - } - { - typedef int T; - static_assert(!ex::is_volatile_v, ""); - static_assert(ex::is_volatile_v == std::is_volatile::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivial_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivial_v == std::is_trivial::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_trivial_v, ""); - static_assert(ex::is_trivial_v == std::is_trivial::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_copyable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_copyable_v == std::is_trivially_copyable::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_trivially_copyable_v, ""); - static_assert(ex::is_trivially_copyable_v == std::is_trivially_copyable::value, ""); - } - { - typedef int T; - static_assert(ex::is_standard_layout_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_standard_layout_v == std::is_standard_layout::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_standard_layout_v, ""); - static_assert(ex::is_standard_layout_v == std::is_standard_layout::value, ""); - } - { - typedef int T; - static_assert(ex::is_pod_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_pod_v == std::is_pod::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_pod_v, ""); - static_assert(ex::is_pod_v == std::is_pod::value, ""); - } - { - typedef int T; - static_assert(ex::is_literal_type_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_literal_type_v == std::is_literal_type::value, ""); - } - { - typedef non_literal_type T; - static_assert(!ex::is_literal_type_v, ""); - static_assert(ex::is_literal_type_v == std::is_literal_type::value, ""); - } - { - typedef empty_type T; - static_assert(ex::is_empty_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_empty_v == std::is_empty::value, ""); - } - { - typedef int T; - static_assert(!ex::is_empty_v, ""); - static_assert(ex::is_empty_v == std::is_empty::value, ""); - } - { - typedef polymorphic_type T; - static_assert(ex::is_polymorphic_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_polymorphic_v == std::is_polymorphic::value, ""); - } - { - typedef int T; - static_assert(!ex::is_polymorphic_v, ""); - static_assert(ex::is_polymorphic_v == std::is_polymorphic::value, ""); - } - { - typedef abstract_type T; - static_assert(ex::is_abstract_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_abstract_v == std::is_abstract::value, ""); - } - { - typedef int T; - static_assert(!ex::is_abstract_v, ""); - static_assert(ex::is_abstract_v == std::is_abstract::value, ""); - } - { - typedef final_type T; - static_assert(ex::is_final_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_final_v == std::is_final::value, ""); - } - { - typedef int T; - static_assert(!ex::is_final_v, ""); - static_assert(ex::is_final_v == std::is_final::value, ""); - } - { - typedef int T; - static_assert(ex::is_signed_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_signed_v == std::is_signed::value, ""); - } - { - typedef unsigned T; - static_assert(!ex::is_signed_v, ""); - static_assert(ex::is_signed_v == std::is_signed::value, ""); - } - { - typedef unsigned T; - static_assert(ex::is_unsigned_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_unsigned_v == std::is_unsigned::value, ""); - } - { - typedef int T; - static_assert(!ex::is_unsigned_v, ""); - static_assert(ex::is_unsigned_v == std::is_unsigned::value, ""); - } -} - -void is_constructible_and_assignable_test() -{ - { - typedef int T; - static_assert(ex::is_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_constructible_v == std::is_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_constructible_v, ""); - static_assert(ex::is_constructible_v == std::is_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_default_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_default_constructible_v, ""); - static_assert(ex::is_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_copy_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_copy_constructible_v, ""); - static_assert(ex::is_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_move_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_move_constructible_v, ""); - static_assert(ex::is_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef int & T; - typedef int U; - static_assert(ex::is_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_assignable_v == std::is_assignable::value, ""); - } - { - typedef int & T; - typedef void U; - static_assert(!ex::is_assignable_v, ""); - static_assert(ex::is_assignable_v == std::is_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_copy_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_copy_assignable_v, ""); - static_assert(ex::is_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_move_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_move_assignable_v, ""); - static_assert(ex::is_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_destructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_destructible_v == std::is_destructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_destructible_v, ""); - static_assert(ex::is_destructible_v == std::is_destructible::value, ""); - } -} - -void is_trivially_constructible_and_assignable_test() -{ - { - typedef int T; - static_assert(ex::is_trivially_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_constructible_v == std::is_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_constructible_v, ""); - static_assert(ex::is_trivially_constructible_v == std::is_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_default_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_trivially_default_constructible_v, ""); - static_assert(ex::is_trivially_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_copy_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_copy_constructible_v, ""); - static_assert(ex::is_trivially_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_move_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_move_constructible_v, ""); - static_assert(ex::is_trivially_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef int & T; - typedef int U; - static_assert(ex::is_trivially_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_assignable_v == std::is_assignable::value, ""); - } - { - typedef int & T; - typedef void U; - static_assert(!ex::is_trivially_assignable_v, ""); - static_assert(ex::is_trivially_assignable_v == std::is_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_copy_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_copy_assignable_v, ""); - static_assert(ex::is_trivially_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_move_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_move_assignable_v, ""); - static_assert(ex::is_trivially_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_trivially_destructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_trivially_destructible_v == std::is_destructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_trivially_destructible_v, ""); - static_assert(ex::is_trivially_destructible_v == std::is_destructible::value, ""); - } -} - - - -void is_nothrow_constructible_and_assignable_test() -{ - { - typedef int T; - static_assert(ex::is_nothrow_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_constructible_v == std::is_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_constructible_v, ""); - static_assert(ex::is_nothrow_constructible_v == std::is_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_default_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int & T; - static_assert(!ex::is_nothrow_default_constructible_v, ""); - static_assert(ex::is_nothrow_default_constructible_v == std::is_default_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_copy_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_copy_constructible_v, ""); - static_assert(ex::is_nothrow_copy_constructible_v == std::is_copy_constructible::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_move_constructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_move_constructible_v, ""); - static_assert(ex::is_nothrow_move_constructible_v == std::is_move_constructible::value, ""); - } - { - typedef int & T; - typedef int U; - static_assert(ex::is_nothrow_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_assignable_v == std::is_assignable::value, ""); - } - { - typedef int & T; - typedef void U; - static_assert(!ex::is_nothrow_assignable_v, ""); - static_assert(ex::is_nothrow_assignable_v == std::is_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_copy_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_copy_assignable_v, ""); - static_assert(ex::is_nothrow_copy_assignable_v == std::is_copy_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_move_assignable_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_move_assignable_v, ""); - static_assert(ex::is_nothrow_move_assignable_v == std::is_move_assignable::value, ""); - } - { - typedef int T; - static_assert(ex::is_nothrow_destructible_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::is_nothrow_destructible_v == std::is_destructible::value, ""); - } - { - typedef void T; - static_assert(!ex::is_nothrow_destructible_v, ""); - static_assert(ex::is_nothrow_destructible_v == std::is_destructible::value, ""); - } -} - -int main() -{ - type_properties_test(); - is_constructible_and_assignable_test(); - is_trivially_constructible_and_assignable_test(); - is_nothrow_constructible_and_assignable_test(); - { - typedef virtual_dtor_type T; - static_assert(ex::has_virtual_destructor_v, ""); - static_assert(std::is_same), const bool>::value, ""); - static_assert(ex::has_virtual_destructor_v == std::has_virtual_destructor::value, ""); - } - { - typedef int T; - static_assert(!ex::has_virtual_destructor_v, ""); - static_assert(ex::has_virtual_destructor_v == std::has_virtual_destructor::value, ""); - } -} - diff --git a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.query.pass.cpp b/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.query.pass.cpp deleted file mode 100644 index f91667da5..000000000 --- a/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.query.pass.cpp +++ /dev/null @@ -1,62 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 -// - -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef char T; - static_assert(ex::alignment_of_v == 1, ""); - static_assert(std::is_same), const std::size_t>::value, ""); - static_assert(ex::alignment_of_v == std::alignment_of::value, ""); - } - { - typedef char(T)[1][1][1]; - static_assert(ex::rank_v == 3, ""); - static_assert(std::is_same), const std::size_t>::value, ""); - static_assert(ex::rank_v == std::rank::value, ""); - } - { - typedef void T; - static_assert(ex::rank_v == 0, ""); - static_assert(ex::rank_v == std::rank::value, ""); - } - { - typedef char(T)[2][3][4]; - static_assert(ex::extent_v == 2, ""); - static_assert(std::is_same), const std::size_t>::value, ""); - static_assert(ex::extent_v == std::extent::value, ""); - } - { - typedef char(T)[2][3][4]; - static_assert(ex::extent_v == 2, ""); - static_assert(ex::extent_v == std::extent::value, ""); - } - { - typedef char(T)[2][3][4]; - static_assert(ex::extent_v == 3, ""); - static_assert(ex::extent_v == std::extent::value, ""); - } - { - typedef char(T)[2][3][4]; - static_assert(ex::extent_v == 0, ""); - static_assert(ex::extent_v == std::extent::value, ""); - } - { - typedef void T; - static_assert(ex::extent_v == 0, ""); - static_assert(ex::extent_v == std::extent::value, ""); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp deleted file mode 100644 index 485da33cd..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// Test that is included. - -#include - -int main() -{ - std::ratio<100> x; - ((void)x); -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_equal_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_equal_v.pass.cpp deleted file mode 100644 index 641e6ae22..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_equal_v.pass.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_equal_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_equal_v, "" - ); - static_assert( - ex::ratio_equal_v == std::ratio_equal::value, "" - ); - static_assert( - std::is_same), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert( - !ex::ratio_equal_v, "" - ); - static_assert( - ex::ratio_equal_v == std::ratio_equal::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_equal_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_equal_v.pass.cpp deleted file mode 100644 index 3896d0ac6..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_equal_v.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_greater_equal_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_greater_equal_v, "" - ); - static_assert( - ex::ratio_greater_equal_v - == std::ratio_greater_equal::value, "" - ); - static_assert( - std::is_same< - decltype(ex::ratio_greater_equal_v), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_greater_equal_v, "" - ); - static_assert( - ex::ratio_greater_equal_v - == std::ratio_greater_equal::value, "" - ); - } - { - typedef std::ratio<2, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_greater_equal_v, "" - ); - static_assert( - ex::ratio_greater_equal_v - == std::ratio_greater_equal::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_v.pass.cpp deleted file mode 100644 index bdc54515f..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_greater_v.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_greater_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_greater_v, "" - ); - static_assert( - ex::ratio_greater_v == std::ratio_greater::value, "" - ); - static_assert( - std::is_same), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_greater_v, "" - ); - static_assert( - ex::ratio_greater_v == std::ratio_greater::value, "" - ); - } - { - typedef std::ratio<2, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_greater_v, "" - ); - static_assert( - ex::ratio_greater_v == std::ratio_greater::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_equal_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_equal_v.pass.cpp deleted file mode 100644 index 50f213b01..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_equal_v.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_less_equal_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_less_equal_v, "" - ); - static_assert( - ex::ratio_less_equal_v == std::ratio_less_equal::value, "" - ); - static_assert( - std::is_same), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_less_equal_v, "" - ); - static_assert( - ex::ratio_less_equal_v == std::ratio_less_equal::value, "" - ); - } - { - typedef std::ratio<2, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_less_equal_v, "" - ); - static_assert( - ex::ratio_less_equal_v == std::ratio_less_equal::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_v.pass.cpp deleted file mode 100644 index 7a6d7738b..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_less_v.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_less_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - static_assert( - ex::ratio_less_v, "" - ); - static_assert( - ex::ratio_less_v == std::ratio_less::value, "" - ); - static_assert( - std::is_same), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_less_v, "" - ); - static_assert( - ex::ratio_less_v == std::ratio_less::value, "" - ); - } - { - typedef std::ratio<2, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_less_v, "" - ); - static_assert( - ex::ratio_less_v == std::ratio_less::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_not_equal_v.pass.cpp b/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_not_equal_v.pass.cpp deleted file mode 100644 index b5296ff24..000000000 --- a/test/std/experimental/utilities/ratio/header.ratio.synop/ratio_not_equal_v.pass.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool ratio_not_equal_v; - -#include -#include - -namespace ex = std::experimental; - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert( - ex::ratio_not_equal_v, "" - ); - static_assert( - ex::ratio_not_equal_v == std::ratio_not_equal::value, "" - ); - static_assert( - std::is_same), const bool>::value - , "" - ); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert( - !ex::ratio_not_equal_v, "" - ); - static_assert( - ex::ratio_not_equal_v == std::ratio_not_equal::value, "" - ); - } -} diff --git a/test/std/experimental/utilities/ratio/nothing_to_do.pass.cpp b/test/std/experimental/utilities/ratio/nothing_to_do.pass.cpp deleted file mode 100644 index 9a59227ab..000000000 --- a/test/std/experimental/utilities/ratio/nothing_to_do.pass.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/std/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp b/test/std/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp deleted file mode 100644 index de813925f..000000000 --- a/test/std/experimental/utilities/syserror/header.system_error.synop/includes.pass.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -#include - -int main() -{ - // Check that has been included - std::error_code ec; - ((void)ec); -} diff --git a/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_code_enum_v.pass.cpp b/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_code_enum_v.pass.cpp deleted file mode 100644 index f944123eb..000000000 --- a/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_code_enum_v.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool is_error_code_enum_v; - -#include -#include /* for std::io_errc */ - -namespace ex = std::experimental; - -int main() { - { - static_assert(ex::is_error_code_enum_v, ""); - - static_assert(ex::is_error_code_enum_v == - std::is_error_code_enum ::value, ""); - - static_assert(std::is_same), - const bool>::value, ""); - } - { - static_assert(!ex::is_error_code_enum_v, ""); - - static_assert(ex::is_error_code_enum_v == - std::is_error_code_enum ::value, ""); - } -} diff --git a/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_condition_enum.pass.cpp b/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_condition_enum.pass.cpp deleted file mode 100644 index ee8dc57aa..000000000 --- a/test/std/experimental/utilities/syserror/header.system_error.synop/is_error_condition_enum.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool is_error_condition_enum_v; - -#include -#include -namespace ex = std::experimental; - -int main() { - { - static_assert(ex::is_error_condition_enum_v, ""); - - static_assert(ex::is_error_condition_enum_v == - std::is_error_condition_enum ::value, ""); - - static_assert( - std::is_same), - const bool>::value, - ""); - } - { - static_assert(!ex::is_error_condition_enum_v, ""); - - static_assert(ex::is_error_condition_enum_v == - std::is_error_condition_enum ::value, ""); - } -} diff --git a/test/std/experimental/utilities/time/header.chrono.synop/includes.pass.cpp b/test/std/experimental/utilities/time/header.chrono.synop/includes.pass.cpp deleted file mode 100644 index f6ad37f9e..000000000 --- a/test/std/experimental/utilities/time/header.chrono.synop/includes.pass.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// - -#include - -int main() -{ - // Check that has been included. - std::chrono::seconds s; - ((void)s); -} diff --git a/test/std/experimental/utilities/time/header.chrono.synop/treat_as_floating_point_v.pass.cpp b/test/std/experimental/utilities/time/header.chrono.synop/treat_as_floating_point_v.pass.cpp deleted file mode 100644 index 9ac9a2ed1..000000000 --- a/test/std/experimental/utilities/time/header.chrono.synop/treat_as_floating_point_v.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr bool treat_as_floating_point_v; - -#include -#include - -namespace ex = std::chrono::experimental; -namespace cr = std::chrono; - -template -void test() -{ - static_assert( - ex::treat_as_floating_point_v == Expect, "" - ); - static_assert( - ex::treat_as_floating_point_v == cr::treat_as_floating_point::value, "" - ); -} - -int main() -{ - { - static_assert( - std::is_same< - decltype(ex::treat_as_floating_point_v), const bool - >::value, "" - ); - } - test(); - test(); - test(); - test(); - test(); - test(); - test(); -} diff --git a/test/std/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp b/test/std/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp deleted file mode 100644 index 5cfb15e3d..000000000 --- a/test/std/experimental/utilities/tuple/header.tuple.synop/includes.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -#include - -int main() -{ - std::tuple x(1); - (void)x; -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/arg_type.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/arg_type.pass.cpp deleted file mode 100644 index cb44707fa..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/arg_type.pass.cpp +++ /dev/null @@ -1,187 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Test with different ref/ptr/cv qualified argument types. - -#include -#include -#include -#include - -// std::array is explicitly allowed to be initialized with A a = { init-list };. -// Disable the missing braces warning for this reason. -#include "disable_missing_braces_warning.h" - - -namespace ex = std::experimental; - -int call_with_value(int x, int y) { return (x + y); } -int call_with_ref(int & x, int & y) { return (x + y); } -int call_with_const_ref(int const & x, int const & y) { return (x + y); } -int call_with_rvalue_ref(int && x, int && y) { return (x + y); } -int call_with_pointer(int * x, int * y) { return (*x + *y); } -int call_with_const_pointer(int const* x, int const * y) { return (*x + *y); } - - -template -void test_values() -{ - { - Tuple t{1, 2}; - assert(3 == ex::apply(call_with_value, t)); - } - { - Tuple t{2, 2}; - assert(4 == ex::apply(call_with_ref, t)); - } - { - Tuple t{2, 3}; - assert(5 == ex::apply(call_with_const_ref, t)); - } - { - Tuple t{3, 3}; - assert(6 == ex::apply(call_with_rvalue_ref, static_cast(t))); - } - { - Tuple const t{4, 4}; - assert(8 == ex::apply(call_with_value, t)); - } - { - Tuple const t{4, 5}; - assert(9 == ex::apply(call_with_const_ref, t)); - } -} - -template -void test_refs() -{ - int x = 0; - int y = 0; - { - x = 1; y = 2; - Tuple t{x, y}; - assert(3 == ex::apply(call_with_value, t)); - } - { - x = 2; y = 2; - Tuple t{x, y}; - assert(4 == ex::apply(call_with_ref, t)); - } - { - x = 2; y = 3; - Tuple t{x, y}; - assert(5 == ex::apply(call_with_const_ref, t)); - } - { - x = 3; y = 3; - Tuple const t{x, y}; - assert(6 == ex::apply(call_with_value, t)); - } - { - x = 3; y = 4; - Tuple const t{x, y}; - assert(7 == ex::apply(call_with_const_ref, t)); - } -} - -template -void test_const_refs() -{ - int x = 0; - int y = 0; - { - x = 1; y = 2; - Tuple t{x, y}; - assert(3 == ex::apply(call_with_value, t)); - } - { - x = 2; y = 3; - Tuple t{x, y}; - assert(5 == ex::apply(call_with_const_ref, t)); - } - { - x = 3; y = 3; - Tuple const t{x, y}; - assert(6 == ex::apply(call_with_value, t)); - } - { - x = 3; y = 4; - Tuple const t{x, y}; - assert(7 == ex::apply(call_with_const_ref, t)); - } -} - - -template -void test_pointer() -{ - int x = 0; - int y = 0; - { - x = 2; y = 2; - Tuple t{&x, &y}; - assert(4 == ex::apply(call_with_pointer, t)); - } - { - x = 2; y = 3; - Tuple t{&x, &y}; - assert(5 == ex::apply(call_with_const_pointer, t)); - } - { - x = 3; y = 4; - Tuple const t{&x, &y}; - assert(7 == ex::apply(call_with_const_pointer, t)); - } -} - - -template -void test_const_pointer() -{ - int x = 0; - int y = 0; - { - x = 2; y = 3; - Tuple t{&x, &y}; - assert(5 == ex::apply(call_with_const_pointer, t)); - } - { - x = 3; y = 4; - Tuple const t{&x, &y}; - assert(7 == ex::apply(call_with_const_pointer, t)); - } -} - - -int main() -{ - test_values>(); - test_values>(); - test_values>(); - - test_refs>(); - test_refs>(); - - test_const_refs>(); - test_const_refs>(); - - test_pointer>(); - test_pointer>(); - test_pointer>(); - - test_const_pointer>(); - test_const_pointer>(); - test_const_pointer>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp deleted file mode 100644 index 5b8a8f09d..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Testing constexpr evaluation - -#include -#include -#include - -constexpr int f_int_0() { return 1; } -constexpr int f_int_1(int x) { return x; } -constexpr int f_int_2(int x, int y) { return (x + y); } - -struct A_int_0 -{ - constexpr A_int_0() {} - constexpr int operator()() const { return 1; } -}; - -struct A_int_1 -{ - constexpr A_int_1() {} - constexpr int operator()(int x) const { return x; } -}; - -struct A_int_2 -{ - constexpr A_int_2() {} - constexpr int operator()(int x, int y) const { return (x + y); } -}; - -namespace ex = std::experimental; - -template -void test_0() -{ - // function - { - constexpr Tuple t{}; - static_assert(1 == ex::apply(f_int_0, t), ""); - } - // function pointer - { - constexpr Tuple t{}; - constexpr auto fp = &f_int_0; - static_assert(1 == ex::apply(fp, t), ""); - } - // functor - { - constexpr Tuple t{}; - constexpr A_int_0 a; - static_assert(1 == ex::apply(a, t), ""); - } -} - -template -void test_1() -{ - // function - { - constexpr Tuple t{1}; - static_assert(1 == ex::apply(f_int_1, t), ""); - } - // function pointer - { - constexpr Tuple t{2}; - constexpr int (*fp)(int) = f_int_1; - static_assert(2 == ex::apply(fp, t), ""); - } - // functor - { - constexpr Tuple t{3}; - constexpr A_int_1 fn; - static_assert(3 == ex::apply(fn, t), ""); - } -} - -template -void test_2() -{ - // function - { - constexpr Tuple t{1, 2}; - static_assert(3 == ex::apply(f_int_2, t), ""); - } - // function pointer - { - constexpr Tuple t{2, 3}; - constexpr auto fp = &f_int_2; - static_assert(5 == ex::apply(fp, t), ""); - } - // functor - { - constexpr Tuple t{3, 4}; - constexpr A_int_2 a; - static_assert(7 == ex::apply(a, t), ""); - } -} - -int main() -{ - test_0>(); - test_1>(); - test_2>(); - test_2>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp deleted file mode 100644 index 57dff4497..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp +++ /dev/null @@ -1,427 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Testing extended function types. The extended function types are those -// named by INVOKE but that are not actual callable objects. These include -// bullets 1-4 of invoke. - -#include -#include -#include -#include - -// std::array is explicitly allowed to be initialized with A a = { init-list };. -// Disable the missing braces warning for this reason. -#include "disable_missing_braces_warning.h" - -int count = 0; - -struct A_int_0 -{ - A_int_0() : obj1(0){} - A_int_0(int x) : obj1(x) {} - int mem1() { return ++count; } - int mem2() const { return ++count; } - int const obj1; -}; - -struct A_int_1 -{ - A_int_1() {} - A_int_1(int) {} - int mem1(int x) { return count += x; } - int mem2(int x) const { return count += x; } -}; - -struct A_int_2 -{ - A_int_2() {} - A_int_2(int) {} - int mem1(int x, int y) { return count += (x + y); } - int mem2(int x, int y) const { return count += (x + y); } -}; - -template -struct A_wrap -{ - A_wrap() {} - A_wrap(int x) : m_a(x) {} - A & operator*() { return m_a; } - A const & operator*() const { return m_a; } - A m_a; -}; - -typedef A_wrap A_wrap_0; -typedef A_wrap A_wrap_1; -typedef A_wrap A_wrap_2; - - -template -struct A_base : public A -{ - A_base() : A() {} - A_base(int x) : A(x) {} -}; - -typedef A_base A_base_0; -typedef A_base A_base_1; -typedef A_base A_base_2; - -namespace ex = std::experimental; - -template < - class Tuple, class ConstTuple - , class TuplePtr, class ConstTuplePtr - , class TupleWrap, class ConstTupleWrap - , class TupleBase, class ConstTupleBase - > -void test_ext_int_0() -{ - count = 0; - typedef A_int_0 T; - typedef A_wrap_0 Wrap; - typedef A_base_0 Base; - - typedef int(T::*mem1_t)(); - mem1_t mem1 = &T::mem1; - - typedef int(T::*mem2_t)() const; - mem2_t mem2 = &T::mem2; - - typedef int const T::*obj1_t; - obj1_t obj1 = &T::obj1; - - // member function w/ref - { - T a; - Tuple t{a}; - assert(1 == ex::apply(mem1, t)); - assert(count == 1); - } - count = 0; - // member function w/pointer - { - T a; - TuplePtr t{&a}; - assert(1 == ex::apply(mem1, t)); - assert(count == 1); - } - count = 0; - // member function w/base - { - Base a; - TupleBase t{a}; - assert(1 == ex::apply(mem1, t)); - assert(count == 1); - } - count = 0; - // member function w/wrap - { - Wrap a; - TupleWrap t{a}; - assert(1 == ex::apply(mem1, t)); - assert(count == 1); - } - count = 0; - // const member function w/ref - { - T const a; - ConstTuple t{a}; - assert(1 == ex::apply(mem2, t)); - assert(count == 1); - } - count = 0; - // const member function w/pointer - { - T const a; - ConstTuplePtr t{&a}; - assert(1 == ex::apply(mem2, t)); - assert(count == 1); - } - count = 0; - // const member function w/base - { - Base const a; - ConstTupleBase t{a}; - assert(1 == ex::apply(mem2, t)); - assert(count == 1); - } - count = 0; - // const member function w/wrapper - { - Wrap const a; - ConstTupleWrap t{a}; - assert(1 == ex::apply(mem2, t)); - assert(1 == count); - } - // member object w/ref - { - T a{42}; - Tuple t{a}; - assert(42 == ex::apply(obj1, t)); - } - // member object w/pointer - { - T a{42}; - TuplePtr t{&a}; - assert(42 == ex::apply(obj1, t)); - } - // member object w/base - { - Base a{42}; - TupleBase t{a}; - assert(42 == ex::apply(obj1, t)); - } - // member object w/wrapper - { - Wrap a{42}; - TupleWrap t{a}; - assert(42 == ex::apply(obj1, t)); - } -} - - -template < - class Tuple, class ConstTuple - , class TuplePtr, class ConstTuplePtr - , class TupleWrap, class ConstTupleWrap - , class TupleBase, class ConstTupleBase - > -void test_ext_int_1() -{ - count = 0; - typedef A_int_1 T; - typedef A_wrap_1 Wrap; - typedef A_base_1 Base; - - typedef int(T::*mem1_t)(int); - mem1_t mem1 = &T::mem1; - - typedef int(T::*mem2_t)(int) const; - mem2_t mem2 = &T::mem2; - - // member function w/ref - { - T a; - Tuple t{a, 2}; - assert(2 == ex::apply(mem1, t)); - assert(count == 2); - } - count = 0; - // member function w/pointer - { - T a; - TuplePtr t{&a, 3}; - assert(3 == ex::apply(mem1, t)); - assert(count == 3); - } - count = 0; - // member function w/base - { - Base a; - TupleBase t{a, 4}; - assert(4 == ex::apply(mem1, t)); - assert(count == 4); - } - count = 0; - // member function w/wrap - { - Wrap a; - TupleWrap t{a, 5}; - assert(5 == ex::apply(mem1, t)); - assert(count == 5); - } - count = 0; - // const member function w/ref - { - T const a; - ConstTuple t{a, 6}; - assert(6 == ex::apply(mem2, t)); - assert(count == 6); - } - count = 0; - // const member function w/pointer - { - T const a; - ConstTuplePtr t{&a, 7}; - assert(7 == ex::apply(mem2, t)); - assert(count == 7); - } - count = 0; - // const member function w/base - { - Base const a; - ConstTupleBase t{a, 8}; - assert(8 == ex::apply(mem2, t)); - assert(count == 8); - } - count = 0; - // const member function w/wrapper - { - Wrap const a; - ConstTupleWrap t{a, 9}; - assert(9 == ex::apply(mem2, t)); - assert(9 == count); - } -} - - -template < - class Tuple, class ConstTuple - , class TuplePtr, class ConstTuplePtr - , class TupleWrap, class ConstTupleWrap - , class TupleBase, class ConstTupleBase - > -void test_ext_int_2() -{ - count = 0; - typedef A_int_2 T; - typedef A_wrap_2 Wrap; - typedef A_base_2 Base; - - typedef int(T::*mem1_t)(int, int); - mem1_t mem1 = &T::mem1; - - typedef int(T::*mem2_t)(int, int) const; - mem2_t mem2 = &T::mem2; - - // member function w/ref - { - T a; - Tuple t{a, 1, 1}; - assert(2 == ex::apply(mem1, t)); - assert(count == 2); - } - count = 0; - // member function w/pointer - { - T a; - TuplePtr t{&a, 1, 2}; - assert(3 == ex::apply(mem1, t)); - assert(count == 3); - } - count = 0; - // member function w/base - { - Base a; - TupleBase t{a, 2, 2}; - assert(4 == ex::apply(mem1, t)); - assert(count == 4); - } - count = 0; - // member function w/wrap - { - Wrap a; - TupleWrap t{a, 2, 3}; - assert(5 == ex::apply(mem1, t)); - assert(count == 5); - } - count = 0; - // const member function w/ref - { - T const a; - ConstTuple t{a, 3, 3}; - assert(6 == ex::apply(mem2, t)); - assert(count == 6); - } - count = 0; - // const member function w/pointer - { - T const a; - ConstTuplePtr t{&a, 3, 4}; - assert(7 == ex::apply(mem2, t)); - assert(count == 7); - } - count = 0; - // const member function w/base - { - Base const a; - ConstTupleBase t{a, 4, 4}; - assert(8 == ex::apply(mem2, t)); - assert(count == 8); - } - count = 0; - // const member function w/wrapper - { - Wrap const a; - ConstTupleWrap t{a, 4, 5}; - assert(9 == ex::apply(mem2, t)); - assert(9 == count); - } -} - -int main() -{ - { - test_ext_int_0< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - test_ext_int_0< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - test_ext_int_0< - std::array, std::array - , std::array, std::array - , std::array, std::array - , std::array, std::array - >(); - } - { - test_ext_int_1< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - test_ext_int_1< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - test_ext_int_1< - std::pair, std::pair - , std::pair, std::pair - , std::pair, std::pair - , std::pair, std::pair - >(); - test_ext_int_1< - std::pair, std::pair - , std::pair, std::pair - , std::pair, std::pair - , std::pair, std::pair - >(); - } - { - test_ext_int_2< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - test_ext_int_2< - std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - , std::tuple, std::tuple - >(); - } -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/large_arity.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/large_arity.pass.cpp deleted file mode 100644 index 027258ad8..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/large_arity.pass.cpp +++ /dev/null @@ -1,146 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Stress testing large arities with tuple and array. - -#include -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////// -template -struct always_imp -{ - typedef T type; -}; - -template -using always_t = typename always_imp::type; - -//////////////////////////////////////////////////////////////////////////////// -template -struct make_function; - -template -struct make_function> -{ - using type = bool (*)(always_t...); -}; - -template -using make_function_t = typename make_function>::type; - -//////////////////////////////////////////////////////////////////////////////// -template -struct make_tuple_imp; - -//////////////////////////////////////////////////////////////////////////////// -template -struct make_tuple_imp> -{ - using type = std::tuple...>; -}; - -template -using make_tuple_t = typename make_tuple_imp>::type; - -template -bool test_apply_fn(Types...) { return true; } - -namespace ex = std::experimental; - -template -void test_all() -{ - - using A = std::array; - using ConstA = std::array; - - using Tuple = make_tuple_t; - using CTuple = make_tuple_t; - - using ValFn = make_function_t; - ValFn val_fn = &test_apply_fn; - - using RefFn = make_function_t; - RefFn ref_fn = &test_apply_fn; - - using CRefFn = make_function_t; - CRefFn cref_fn = &test_apply_fn; - - using RRefFn = make_function_t; - RRefFn rref_fn = &test_apply_fn; - - { - A a{}; - assert(ex::apply(val_fn, a)); - assert(ex::apply(ref_fn, a)); - assert(ex::apply(cref_fn, a)); - assert(ex::apply(rref_fn, std::move(a))); - } - { - ConstA a{}; - assert(ex::apply(val_fn, a)); - assert(ex::apply(cref_fn, a)); - } - { - Tuple a{}; - assert(ex::apply(val_fn, a)); - assert(ex::apply(ref_fn, a)); - assert(ex::apply(cref_fn, a)); - assert(ex::apply(rref_fn, std::move(a))); - } - { - CTuple a{}; - assert(ex::apply(val_fn, a)); - assert(ex::apply(cref_fn, a)); - } - -} - - -template -void test_one() -{ - using A = std::array; - using Tuple = make_tuple_t; - - using ValFn = make_function_t; - ValFn val_fn = &test_apply_fn; - - { - A a{}; - assert(ex::apply(val_fn, a)); - } - { - Tuple a{}; - assert(ex::apply(val_fn, a)); - } -} - -int main() -{ - // Instantiate with 1-5 arguments. - test_all<1>(); - test_all<2>(); - test_all<3>(); - test_all<4>(); - test_all<5>(); - - // Stress test with 128. - test_one<128>(); - //test_one<256>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp deleted file mode 100644 index 3cf259f53..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/ref_qualifiers.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Testing ref qualified functions - -#include -#include - -struct func_obj -{ - constexpr func_obj() {} - - constexpr int operator()() const & { return 1; } - constexpr int operator()() const && { return 2; } - constexpr int operator()() & { return 3; } - constexpr int operator()() && { return 4; } -}; - -namespace ex = std::experimental; - -int main() -{ -// TODO(ericwf): Re-enable constexpr support -/* - { - constexpr func_obj f; - constexpr std::tuple<> tp; - - static_assert(1 == ex::apply(static_cast(f), tp), ""); - static_assert(2 == ex::apply(static_cast(f), tp), ""); - } -*/ - { - func_obj f; - std::tuple<> tp; - assert(1 == ex::apply(static_cast(f), tp)); - assert(2 == ex::apply(static_cast(f), tp)); - assert(3 == ex::apply(static_cast(f), tp)); - assert(4 == ex::apply(static_cast(f), tp)); - } -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp deleted file mode 100644 index 01d36637e..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Test the return type deduction. - -#include -#include - -static int my_int = 42; - -template struct index_t {}; - -void f(index_t<0>) {} - -int f(index_t<1>) { return 0; } - -int & f(index_t<2>) { return static_cast(my_int); } -int const & f(index_t<3>) { return static_cast(my_int); } -int volatile & f(index_t<4>) { return static_cast(my_int); } -int const volatile & f(index_t<5>) { return static_cast(my_int); } - -int && f(index_t<6>) { return static_cast(my_int); } -int const && f(index_t<7>) { return static_cast(my_int); } -int volatile && f(index_t<8>) { return static_cast(my_int); } -int const volatile && f(index_t<9>) { return static_cast(my_int); } - -int * f(index_t<10>) { return static_cast(&my_int); } -int const * f(index_t<11>) { return static_cast(&my_int); } -int volatile * f(index_t<12>) { return static_cast(&my_int); } -int const volatile * f(index_t<13>) { return static_cast(&my_int); } - - -template -void test() -{ - using F = decltype(f(index_t{})); - static_assert(std::is_same::value, ""); -} - -namespace ex = std::experimental; - -int main() -{ - test<0, void>(); - test<1, int>(); - test<2, int &>(); - test<3, int const &>(); - test<4, int volatile &>(); - test<5, int const volatile &>(); - test<6, int &&>(); - test<7, int const &&>(); - test<8, int volatile &&>(); - test<9, int const volatile &&>(); - test<10, int *>(); - test<11, int const *>(); - test<12, int volatile *>(); - test<13, int const volatile *>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple.apply/types.pass.cpp b/test/std/experimental/utilities/tuple/tuple.apply/types.pass.cpp deleted file mode 100644 index 52eec2763..000000000 --- a/test/std/experimental/utilities/tuple/tuple.apply/types.pass.cpp +++ /dev/null @@ -1,431 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr decltype(auto) apply(F &&, T &&) - -// Test function types. - -#include -#include -#include -#include - -// std::array is explicitly allowed to be initialized with A a = { init-list };. -// Disable the missing braces warning for this reason. -#include "disable_missing_braces_warning.h" - -namespace ex = std::experimental; - -int count = 0; - -void f_void_0() { ++count; } -void f_void_1(int i) { count += i; } -void f_void_2(int x, int y) { count += (x + y); } -void f_void_3(int x, int y, int z) { count += (x + y + z); } - -int f_int_0() { return ++count; } -int f_int_1(int x) { return count += x; } -int f_int_2(int x, int y) { return count += (x + y); } -int f_int_3(int x, int y, int z) { return count += (x + y + z); } - -struct A_void_0 -{ - A_void_0() {} - void operator()() { ++count; } - void operator()() const { ++count; ++count; } -}; - -struct A_void_1 -{ - A_void_1() {} - void operator()(int x) { count += x; } - void operator()(int x) const { count += x + 1; } -}; - -struct A_void_2 -{ - A_void_2() {} - void operator()(int x, int y) { count += (x + y); } - void operator()(int x, int y) const { count += (x + y) + 1; } -}; - -struct A_void_3 -{ - A_void_3() {} - void operator()(int x, int y, int z) { count += (x + y + z); } - void operator()(int x, int y, int z) const { count += (x + y + z) + 1; } -}; - - -struct A_int_0 -{ - A_int_0() {} - int operator()() { return ++count; } - int operator()() const { ++count; return ++count; } -}; - -struct A_int_1 -{ - A_int_1() {} - int operator()(int x) { return count += x; } - int operator()(int x) const { return count += (x + 1); } - -}; - -struct A_int_2 -{ - A_int_2() {} - int operator()(int x, int y) { return count += (x + y); } - int operator()(int x, int y) const { return count += (x + y + 1); } -}; - -struct A_int_3 -{ - A_int_3() {} - int operator()(int x, int y, int z) { return count += (x + y + z); } - int operator()(int x, int y, int z) const { return count += (x + y + z + 1); } -}; - - -template -void test_void_0() -{ - count = 0; - // function - { - Tuple t{}; - ex::apply(f_void_0, t); - assert(count == 1); - } - count = 0; - // function pointer - { - Tuple t{}; - auto fp = &f_void_0; - ex::apply(fp, t); - assert(count == 1); - } - count = 0; - // functor - { - Tuple t{}; - A_void_0 a; - ex::apply(a, t); - assert(count == 1); - } - count = 0; - // const functor - { - Tuple t{}; - A_void_0 const a; - ex::apply(a, t); - assert(count == 2); - } -} - -template -void test_void_1() -{ - count = 0; - // function - { - Tuple t{1}; - ex::apply(f_void_1, t); - assert(count == 1); - } - count = 0; - // function pointer - { - Tuple t{2}; - void (*fp)(int) = f_void_1; - ex::apply(fp, t); - assert(count == 2); - } - count = 0; - // functor - { - Tuple t{3}; - A_void_1 fn; - ex::apply(fn, t); - assert(count == 3); - } - count = 0; - // const functor - { - Tuple t{4}; - A_void_1 const a; - ex::apply(a, t); - assert(count == 5); - } -} - -template -void test_void_2() -{ - count = 0; - // function - { - Tuple t{1, 2}; - ex::apply(f_void_2, t); - assert(count == 3); - } - count = 0; - // function pointer - { - Tuple t{2, 3}; - auto fp = &f_void_2; - ex::apply(fp, t); - assert(count == 5); - } - count = 0; - // functor - { - Tuple t{3, 4}; - A_void_2 a; - ex::apply(a, t); - assert(count == 7); - } - count = 0; - // const functor - { - Tuple t{4, 5}; - A_void_2 const a; - ex::apply(a, t); - assert(count == 10); - } -} - -template -void test_void_3() -{ - count = 0; - // function - { - Tuple t{1, 2, 3}; - ex::apply(f_void_3, t); - assert(count == 6); - } - count = 0; - // function pointer - { - Tuple t{2, 3, 4}; - auto fp = &f_void_3; - ex::apply(fp, t); - assert(count == 9); - } - count = 0; - // functor - { - Tuple t{3, 4, 5}; - A_void_3 a; - ex::apply(a, t); - assert(count == 12); - } - count = 0; - // const functor - { - Tuple t{4, 5, 6}; - A_void_3 const a; - ex::apply(a, t); - assert(count == 16); - } -} - - - -template -void test_int_0() -{ - count = 0; - // function - { - Tuple t{}; - assert(1 == ex::apply(f_int_0, t)); - assert(count == 1); - } - count = 0; - // function pointer - { - Tuple t{}; - auto fp = &f_int_0; - assert(1 == ex::apply(fp, t)); - assert(count == 1); - } - count = 0; - // functor - { - Tuple t{}; - A_int_0 a; - assert(1 == ex::apply(a, t)); - assert(count == 1); - } - count = 0; - // const functor - { - Tuple t{}; - A_int_0 const a; - assert(2 == ex::apply(a, t)); - assert(count == 2); - } -} - -template -void test_int_1() -{ - count = 0; - // function - { - Tuple t{1}; - assert(1 == ex::apply(f_int_1, t)); - assert(count == 1); - } - count = 0; - // function pointer - { - Tuple t{2}; - int (*fp)(int) = f_int_1; - assert(2 == ex::apply(fp, t)); - assert(count == 2); - } - count = 0; - // functor - { - Tuple t{3}; - A_int_1 fn; - assert(3 == ex::apply(fn, t)); - assert(count == 3); - } - count = 0; - // const functor - { - Tuple t{4}; - A_int_1 const a; - assert(5 == ex::apply(a, t)); - assert(count == 5); - } -} - -template -void test_int_2() -{ - count = 0; - // function - { - Tuple t{1, 2}; - assert(3 == ex::apply(f_int_2, t)); - assert(count == 3); - } - count = 0; - // function pointer - { - Tuple t{2, 3}; - auto fp = &f_int_2; - assert(5 == ex::apply(fp, t)); - assert(count == 5); - } - count = 0; - // functor - { - Tuple t{3, 4}; - A_int_2 a; - assert(7 == ex::apply(a, t)); - assert(count == 7); - } - count = 0; - // const functor - { - Tuple t{4, 5}; - A_int_2 const a; - assert(10 == ex::apply(a, t)); - assert(count == 10); - } -} - -template -void test_int_3() -{ - count = 0; - // function - { - Tuple t{1, 2, 3}; - assert(6 == ex::apply(f_int_3, t)); - assert(count == 6); - } - count = 0; - // function pointer - { - Tuple t{2, 3, 4}; - auto fp = &f_int_3; - assert(9 == ex::apply(fp, t)); - assert(count == 9); - } - count = 0; - // functor - { - Tuple t{3, 4, 5}; - A_int_3 a; - assert(12 == ex::apply(a, t)); - assert(count == 12); - } - count = 0; - // const functor - { - Tuple t{4, 5, 6}; - A_int_3 const a; - assert(16 == ex::apply(a, t)); - assert(count == 16); - } -} - -template -void test_0() -{ - test_void_0(); - test_int_0(); -} - -template -void test_1() -{ - test_void_1(); - test_int_1(); -} - -template -void test_2() -{ - test_void_2(); - test_int_2(); -} - -template -void test_3() -{ - test_void_3(); - test_int_3(); -} - -int main() -{ - test_0>(); - - test_1>(); - test_1>(); - - test_2>(); - test_2>(); - test_2>(); - - test_3>(); - test_3>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple_size_v.fail.cpp b/test/std/experimental/utilities/tuple/tuple_size_v.fail.cpp deleted file mode 100644 index a25b18cf5..000000000 --- a/test/std/experimental/utilities/tuple/tuple_size_v.fail.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr size_t tuple_size_v = tuple_size::value; - -// Test with reference - -#include - -namespace ex = std::experimental; - -int main() -{ - auto x = ex::tuple_size_v &>; -} diff --git a/test/std/experimental/utilities/tuple/tuple_size_v.pass.cpp b/test/std/experimental/utilities/tuple/tuple_size_v.pass.cpp deleted file mode 100644 index d7a5aa679..000000000 --- a/test/std/experimental/utilities/tuple/tuple_size_v.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr size_t tuple_size_v = tuple_size::value; - -#include -#include -#include - -namespace ex = std::experimental; - -template -void test() -{ - static_assert(ex::tuple_size_v == Expect, ""); - static_assert(ex::tuple_size_v == std::tuple_size::value, ""); - static_assert(ex::tuple_size_v == std::tuple_size::value, ""); - static_assert(ex::tuple_size_v == std::tuple_size::value, ""); - static_assert(ex::tuple_size_v == std::tuple_size::value, ""); -} - -int main() -{ - test, 0>(); - - test, 1>(); - test, 1>(); - - test, 2>(); - test, 2>(); - test, 2>(); - - test, 3>(); - test, 3>(); -} diff --git a/test/std/experimental/utilities/tuple/tuple_size_v_2.fail.cpp b/test/std/experimental/utilities/tuple/tuple_size_v_2.fail.cpp deleted file mode 100644 index a95ac49ff..000000000 --- a/test/std/experimental/utilities/tuple/tuple_size_v_2.fail.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr size_t tuple_size_v = tuple_size::value; - -// Test with non tuple type - -#include - -namespace ex = std::experimental; - -int main() -{ - auto x = ex::tuple_size_v; -} diff --git a/test/std/experimental/utilities/tuple/tuple_size_v_3.fail.cpp b/test/std/experimental/utilities/tuple/tuple_size_v_3.fail.cpp deleted file mode 100644 index 7c2f0cc23..000000000 --- a/test/std/experimental/utilities/tuple/tuple_size_v_3.fail.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03, c++11 - -// - -// template constexpr size_t tuple_size_v = tuple_size::value; - -// Test with pointer - -#include - -namespace ex = std::experimental; - -int main() -{ - auto x = ex::tuple_size_v*>; -}