[libcxx] r206482 - Fixed a test that was attempting to use rvalue-references w/o checking to see if they were supported in the language. This resulted in a warning when testing using C++03.

Marshall Clow mclow.lists at gmail.com
Thu Apr 17 11:11:38 PDT 2014


Author: marshall
Date: Thu Apr 17 13:11:38 2014
New Revision: 206482

URL: http://llvm.org/viewvc/llvm-project?rev=206482&view=rev
Log:
Fixed a test that was attempting to use rvalue-references w/o checking to see if they were supported in the language. This resulted in a warning when testing using C++03.

Modified:
    libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp

Modified: libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp?rev=206482&r1=206481&r2=206482&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp Thu Apr 17 13:11:38 2014
@@ -36,6 +36,7 @@ void test_is_not_assignable()
 
 struct D;
 
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 struct C
 {
     template <class U>
@@ -46,6 +47,7 @@ struct E
 {
     C operator=(int);
 };
+#endif
 
 int main()
 {
@@ -54,9 +56,10 @@ int main()
     test_is_assignable<int&, double> ();
     test_is_assignable<B, A> ();
     test_is_assignable<void*&, void*> ();
-    test_is_assignable<E, int> ();
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    test_is_assignable<E, int> ();
+
     test_is_not_assignable<int, int&> ();
     test_is_not_assignable<int, int> ();
 #endif





More information about the cfe-commits mailing list