From 50d161ce0f3979fbd5e62525a7b9acffdd9309e6 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Tue, 15 Nov 2016 18:48:36 +0000 Subject: [PATCH] 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 --- .../istream.iterator.cons/copy.pass.cpp | 4 ---- .../istream.iterator.cons/default.pass.cpp | 27 ---------------------- .../istream.iterator/types.pass.cpp | 15 +++--------- libcxx/www/cxx1z_status.html | 6 ++--- 4 files changed, 6 insertions(+), 46 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 7f807b6..0d70c7f 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 is true, then -// this constructor shall beis a trivial copy constructor. #include #include #include -#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 0c68282..c1924e4 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 is true, then this -// constructor shall beis a constexpr constructor. #include #include -#include #include "test_macros.h" -struct S { S(); }; // not constexpr - -#if TEST_STD_VER > 14 -template > -struct test_trivial { -void operator ()() const { - constexpr std::istream_iterator it; - } -}; - -template -struct test_trivial { -void operator ()() const {} -}; -#endif - - int main() { { @@ -49,11 +29,4 @@ int main() #endif } -#if TEST_STD_VER > 14 - test_trivial()(); - test_trivial()(); - test_trivial()(); - test_trivial()(); - test_trivial()(); -#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 b1bf75b..1250e36 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 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 is true, then -// this constructor (the default ctor) shall beis a constexpr constructor. -// If is_trivially_copy_constructible_v is true, then -// this constructor (the copy ctor) shall beis a trivial copy constructor. -// If is_trivially_destructible_v is true, then this -// destructor shall beis a trivial destructor. -// Testing the C++17 ctors for this are in the ctor tests. #include #include @@ -42,7 +33,7 @@ int main() { - typedef std::istream_iterator I1; // double is trivially destructible + typedef std::istream_iterator I1; static_assert((std::is_convertible >::value), ""); @@ -52,7 +43,7 @@ int main() static_assert( std::is_trivially_copy_constructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); - typedef std::istream_iterator I2; // unsigned is trivially destructible + typedef std::istream_iterator I2; static_assert((std::is_convertible >::value), ""); @@ -62,7 +53,7 @@ int main() static_assert( std::is_trivially_copy_constructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); - typedef std::istream_iterator I3; // string is NOT trivially destructible + typedef std::istream_iterator I3; static_assert(!std::is_trivially_copy_constructible::value, ""); static_assert(!std::is_trivially_destructible::value, ""); } diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html index 88105db..e998037 100644 --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -130,16 +130,16 @@ P0426R1LWGConstexpr for std::char_traitsIssaquah P0435R1LWGResolving LWG Issues re common_typeIssaquah P0502R0LWGThrowing out of a parallel algorithm terminates - but how?Issaquah - P0503R0LWGCorrecting library usage of "literal type"IssaquahComplete4.0 + P0503R0LWGCorrecting library usage of "literal type"Issaquah P0504R0LWGRevisiting in-place tag types for any/optional/variantIssaquah P0505R0LWGWording for GB 50 - constexpr for chronoIssaquah P0508R0LWGWording for GB 58 - structured bindings for node_handlesIssaquah - P0509R1LWGUpdating “Restrictions on exception handling”IssaquahNothing to don/a + P0509R1LWGUpdating “Restrictions on exception handling”Issaquah P0510R0LWGDisallowing references, incomplete types, arrays, and empty variantsIssaquah P0513R0LWGPoisoning the HashIssaquah P0516R0LWGClarify That shared_future’s Copy Operations have Wide ContractsIssaquahComplete4.0 P0517R0LWGMake future_error ConstructibleIssaquahComplete4.0 - P0521R0LWGProposed Resolution for CA 14 (shared_ptr use_count/unique)IssaquahNothing to don/a + P0521R0LWGProposed Resolution for CA 14 (shared_ptr use_count/unique)Issaquah -- 2.7.4