diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-08-12 21:56:02 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-08-12 21:56:02 +0000 |
commit | 54976f2619ab9ccd321acf46dde4c15baeb84694 (patch) | |
tree | 43d2d54cc7b628da57bae18fb1031d29fb32896f /libcxx/test/language.support | |
parent | c53dd2ac01eb3044da996ad5b8d30ef85a18cda5 (diff) | |
download | bcm5719-llvm-54976f2619ab9ccd321acf46dde4c15baeb84694.tar.gz bcm5719-llvm-54976f2619ab9ccd321acf46dde4c15baeb84694.zip |
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
llvm-svn: 137522
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 } |