[libcxx] r258593 - Fix test to pass in C++03

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 22 17:02:29 PST 2016


Author: marshall
Date: Fri Jan 22 19:02:29 2016
New Revision: 258593

URL: http://llvm.org/viewvc/llvm-project?rev=258593&view=rev
Log:
Fix test to pass in C++03

Modified:
    libcxx/trunk/test/libcxx/utilities/meta/is_referenceable.pass.cpp

Modified: libcxx/trunk/test/libcxx/utilities/meta/is_referenceable.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/meta/is_referenceable.pass.cpp?rev=258593&r1=258592&r2=258593&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/meta/is_referenceable.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/meta/is_referenceable.pass.cpp Fri Jan 22 19:02:29 2016
@@ -25,6 +25,7 @@ struct Foo {};
 static_assert((!std::__is_referenceable<void>::value), "");
 static_assert(( std::__is_referenceable<int>::value), "");
 static_assert(( std::__is_referenceable<int[3]>::value), "");
+static_assert(( std::__is_referenceable<int[]>::value), "");
 static_assert(( std::__is_referenceable<int &>::value), "");
 static_assert(( std::__is_referenceable<const int &>::value), "");
 static_assert(( std::__is_referenceable<int *>::value), "");
@@ -33,121 +34,155 @@ static_assert(( std::__is_referenceable<
 static_assert(( std::__is_referenceable<const Foo>::value), "");
 static_assert(( std::__is_referenceable<Foo &>::value), "");
 static_assert(( std::__is_referenceable<const Foo &>::value), "");
+#ifdef TEST_HAS_RVALUE_REFERENCES
 static_assert(( std::__is_referenceable<Foo &&>::value), "");
 static_assert(( std::__is_referenceable<const Foo &&>::value), "");
+#endif
 
 // Functions without cv-qualifiers are referenceable 
 static_assert(( std::__is_referenceable<void ()>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void () const>::value), "");
 static_assert((!std::__is_referenceable<void () &>::value), "");
-static_assert((!std::__is_referenceable<void () &&>::value), "");
 static_assert((!std::__is_referenceable<void () const &>::value), "");
+static_assert((!std::__is_referenceable<void () &&>::value), "");
 static_assert((!std::__is_referenceable<void () const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int) const>::value), "");
 static_assert((!std::__is_referenceable<void (int) &>::value), "");
-static_assert((!std::__is_referenceable<void (int) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int, float)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int, float) const>::value), "");
 static_assert((!std::__is_referenceable<void (int, float) &>::value), "");
-static_assert((!std::__is_referenceable<void (int, float) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int, float) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int, float, Foo &)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int, float, Foo &) const>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &) &>::value), "");
-static_assert((!std::__is_referenceable<void (int, float, Foo &) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int, float, Foo &) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (...)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (...) const>::value), "");
 static_assert((!std::__is_referenceable<void (...) &>::value), "");
-static_assert((!std::__is_referenceable<void (...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (...) const &>::value), "");
+static_assert((!std::__is_referenceable<void (...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int, ...)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int, ...) const>::value), "");
 static_assert((!std::__is_referenceable<void (int, ...) &>::value), "");
-static_assert((!std::__is_referenceable<void (int, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, ...) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, ...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int, float, ...)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int, float, ...) const>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, ...) &>::value), "");
-static_assert((!std::__is_referenceable<void (int, float, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, ...) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int, float, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, ...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (int, float, Foo &, ...)>::value), "");
+#if TEST_STD_VER >= 11
 static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) const>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) &>::value), "");
-static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) const &>::value), "");
+static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) &&>::value), "");
 static_assert((!std::__is_referenceable<void (int, float, Foo &, ...) const &&>::value), "");
+#endif
 
 // member functions with or without cv-qualifiers are referenceable 
 static_assert(( std::__is_referenceable<void (Foo::*)()>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)() const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)() &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)() &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)() const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)() &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)() const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int, float) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int, float) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(...)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(...) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(...) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(...) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int, ...)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, ...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, ...) const &&>::value), "");
+#endif
 
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...)>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) const>::value), "");
+#if TEST_STD_VER >= 11
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) &>::value), "");
-static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) const &>::value), "");
+static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) &&>::value), "");
 static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) const &&>::value), "");
+#endif
 
 int main () {}




More information about the cfe-commits mailing list