diff options
Diffstat (limited to 'libcxx/test/language.support')
4 files changed, 14 insertions, 2 deletions
diff --git a/libcxx/test/language.support/support.initlist/support.initlist.access/access.pass.cpp b/libcxx/test/language.support/support.initlist/support.initlist.access/access.pass.cpp index b24e2ab530b..1d6d6e28868 100644 --- a/libcxx/test/language.support/support.initlist/support.initlist.access/access.pass.cpp +++ b/libcxx/test/language.support/support.initlist/support.initlist.access/access.pass.cpp @@ -16,6 +16,8 @@ #include <initializer_list> #include <cassert> +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + struct A { A(std::initializer_list<int> il) @@ -30,9 +32,11 @@ struct A } }; +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS A test1 = {3, 2, 1}; #endif } diff --git a/libcxx/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp b/libcxx/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp index f65ebd99d9a..1cb52f41373 100644 --- a/libcxx/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp +++ b/libcxx/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp @@ -18,6 +18,8 @@ struct A {}; int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::initializer_list<A> il; assert(il.size() == 0); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/libcxx/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp b/libcxx/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp index d93f3dc9deb..2c30d9abc24 100644 --- a/libcxx/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp +++ b/libcxx/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp @@ -14,6 +14,8 @@ #include <initializer_list> #include <cassert> +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + struct A { A(std::initializer_list<int> il) @@ -28,9 +30,11 @@ struct A } }; +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS A test1 = {3, 2, 1}; #endif } diff --git a/libcxx/test/language.support/support.initlist/types.pass.cpp b/libcxx/test/language.support/support.initlist/types.pass.cpp index 9ff08e9c99b..835830055ff 100644 --- a/libcxx/test/language.support/support.initlist/types.pass.cpp +++ b/libcxx/test/language.support/support.initlist/types.pass.cpp @@ -26,10 +26,12 @@ struct A {}; int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS static_assert((std::is_same<std::initializer_list<A>::value_type, A>::value), ""); static_assert((std::is_same<std::initializer_list<A>::reference, const A&>::value), ""); static_assert((std::is_same<std::initializer_list<A>::const_reference, const A&>::value), ""); static_assert((std::is_same<std::initializer_list<A>::size_type, std::size_t>::value), ""); static_assert((std::is_same<std::initializer_list<A>::iterator, const A*>::value), ""); static_assert((std::is_same<std::initializer_list<A>::const_iterator, const A*>::value), ""); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } |