Fix a C++03 failure
authorMarshall Clow <mclow.lists@gmail.com>
Tue, 11 Apr 2017 01:54:48 +0000 (01:54 +0000)
committerMarshall Clow <mclow.lists@gmail.com>
Tue, 11 Apr 2017 01:54:48 +0000 (01:54 +0000)
llvm-svn: 299909

libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp

index 506f4757c6538c8b23580f8c7b2294a389f13536..85b14726617f8d270c8459fd627d49c12e857710 100644 (file)
@@ -96,6 +96,9 @@ void test_bullet_two() {
   static_assert(std::is_same<CommonType<int const>, int>::value, "");
   static_assert(std::is_same<CommonType<int volatile[]>, int volatile*>::value, "");
   static_assert(std::is_same<CommonType<void(&)()>, void(*)()>::value, "");
+
+  static_assert(no_common_type<X<float> >::value, "");
+  static_assert(no_common_type<X<double> >::value, "");
 }
 
 template <class T, class U, class Expect>
@@ -306,7 +309,4 @@ int main()
     static_assert((std::is_same<std::common_type<const int, int>::type,       int>::value), "");
     static_assert((std::is_same<std::common_type<int, const int>::type,       int>::value), "");
     static_assert((std::is_same<std::common_type<const int, const int>::type, int>::value), "");
-
-    static_assert(no_common_type<X<float> >::value, "");
-    static_assert(no_common_type<X<double> >::value, "");
 }