diff options
author | Vedant Kumar <vsk@apple.com> | 2016-11-15 18:48:36 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-11-15 18:48:36 +0000 |
commit | 50d161ce0f3979fbd5e62525a7b9acffdd9309e6 (patch) | |
tree | b663983fab465ac9edcd4bff43170812be0d5c0c /libcxx/test/std | |
parent | 22465125b3548057e1453238b0ca8ec60ab828c4 (diff) | |
download | bcm5719-llvm-50d161ce0f3979fbd5e62525a7b9acffdd9309e6.tar.gz bcm5719-llvm-50d161ce0f3979fbd5e62525a7b9acffdd9309e6.zip |
Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests."
This reverts commit r286884, because it breaks the Xcode 7 builders:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/1583
Here is a PR that tracks the issue:
https://llvm.org/bugs/show_bug.cgi?id=31016
llvm-svn: 287004
Diffstat (limited to 'libcxx/test/std')
3 files changed, 3 insertions, 43 deletions
diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp index 7f807b63e3c..0d70c7fc9ed 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp @@ -12,15 +12,11 @@ // class istream_iterator // istream_iterator(const istream_iterator& x); -// C++17 says: If is_trivially_copy_constructible_v<T> is true, then -// this constructor shall beis a trivial copy constructor. #include <iterator> #include <sstream> #include <cassert> -#include "test_macros.h" - int main() { { diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp index 0c6828246af..c1924e4b927 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp @@ -12,32 +12,12 @@ // class istream_iterator // constexpr istream_iterator(); -// C++17 says: If is_trivially_default_constructible_v<T> is true, then this -// constructor shall beis a constexpr constructor. #include <iterator> #include <cassert> -#include <string> #include "test_macros.h" -struct S { S(); }; // not constexpr - -#if TEST_STD_VER > 14 -template <typename T, bool isTrivial = std::is_trivially_default_constructible_v<T>> -struct test_trivial { -void operator ()() const { - constexpr std::istream_iterator<T> it; - } -}; - -template <typename T> -struct test_trivial<T, false> { -void operator ()() const {} -}; -#endif - - int main() { { @@ -49,11 +29,4 @@ int main() #endif } -#if TEST_STD_VER > 14 - test_trivial<int>()(); - test_trivial<char>()(); - test_trivial<double>()(); - test_trivial<S>()(); - test_trivial<std::string>()(); -#endif } diff --git a/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp index b1bf75b1195..1250e364d35 100644 --- a/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp @@ -23,18 +23,9 @@ // typedef basic_istream<charT,traits> istream_type; // ... // -// Before C++17, we have: // If T is a literal type, then the default constructor shall be a constexpr constructor. // If T is a literal type, then this constructor shall be a trivial copy constructor. // If T is a literal type, then this destructor shall be a trivial destructor. -// C++17 says: -// If is_trivially_default_constructible_v<T> is true, then -// this constructor (the default ctor) shall beis a constexpr constructor. -// If is_trivially_copy_constructible_v<T> is true, then -// this constructor (the copy ctor) shall beis a trivial copy constructor. -// If is_trivially_destructible_v<T> is true, then this -// destructor shall beis a trivial destructor. -// Testing the C++17 ctors for this are in the ctor tests. #include <iterator> #include <type_traits> @@ -42,7 +33,7 @@ int main() { - typedef std::istream_iterator<double> I1; // double is trivially destructible + typedef std::istream_iterator<double> I1; static_assert((std::is_convertible<I1, std::iterator<std::input_iterator_tag, double, std::ptrdiff_t, const double*, const double&> >::value), ""); @@ -52,7 +43,7 @@ int main() static_assert( std::is_trivially_copy_constructible<I1>::value, ""); static_assert( std::is_trivially_destructible<I1>::value, ""); - typedef std::istream_iterator<unsigned, wchar_t> I2; // unsigned is trivially destructible + typedef std::istream_iterator<unsigned, wchar_t> I2; static_assert((std::is_convertible<I2, std::iterator<std::input_iterator_tag, unsigned, std::ptrdiff_t, const unsigned*, const unsigned&> >::value), ""); @@ -62,7 +53,7 @@ int main() static_assert( std::is_trivially_copy_constructible<I2>::value, ""); static_assert( std::is_trivially_destructible<I2>::value, ""); - typedef std::istream_iterator<std::string> I3; // string is NOT trivially destructible + typedef std::istream_iterator<std::string> I3; static_assert(!std::is_trivially_copy_constructible<I3>::value, ""); static_assert(!std::is_trivially_destructible<I3>::value, ""); } |