[libcxx] r347263 - [libcxx] Update test of trivial copyability of reference_wrapper

Louis Dionne ldionne at apple.com
Mon Nov 19 12:21:45 PST 2018


Author: ldionne
Date: Mon Nov 19 12:21:45 2018
New Revision: 347263

URL: http://llvm.org/viewvc/llvm-project?rev=347263&view=rev
Log:
[libcxx] Update test of trivial copyability of reference_wrapper

N4151 is not an extension anymore, it was standardized in C++14.

Modified:
    libcxx/trunk/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp

Modified: libcxx/trunk/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp?rev=347263&r1=347262&r2=347263&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp Mon Nov 19 12:21:45 2018
@@ -11,8 +11,8 @@
 
 // reference_wrapper
 
-// Test that reference wrapper meets the requirements of TriviallyCopyable,
-// CopyConstructible and CopyAssignable.
+// Test that reference wrapper meets the requirements of CopyConstructible and
+// CopyAssignable, and TriviallyCopyable (starting in C++14).
 
 // Test fails due to use of is_trivially_* trait.
 // XFAIL: gcc-4.9
@@ -48,8 +48,9 @@ void test()
     typedef std::reference_wrapper<T> Wrap;
     static_assert(std::is_copy_constructible<Wrap>::value, "");
     static_assert(std::is_copy_assignable<Wrap>::value, "");
-    // Extension up for standardization: See N4151.
+#if TEST_STD_VER >= 14
     static_assert(std::is_trivially_copyable<Wrap>::value, "");
+#endif
 }
 
 int main()




More information about the libcxx-commits mailing list