[libcxx] Fix test failure on GCC 4.9
authorLouis Dionne <ldionne@apple.com>
Tue, 11 Dec 2018 15:27:10 +0000 (15:27 +0000)
committerLouis Dionne <ldionne@apple.com>
Tue, 11 Dec 2018 15:27:10 +0000 (15:27 +0000)
GCC 4.9 seems to think that a constexpr default constructor implies
the constructor to be noexcept.

llvm-svn: 348850

libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp

index 07425cf..2dbf551 100644 (file)
 #include <utility>
 #include <type_traits>
 
-#include "archetypes.hpp"
 
+struct ThrowingDefault {
+  ThrowingDefault() { }
+};
+
+struct NonThrowingDefault {
+  NonThrowingDefault() noexcept { }
+};
 
 int main() {
-    using NonThrowingDefault = NonThrowingTypes::DefaultOnly;
-    using ThrowingDefault = NonTrivialTypes::DefaultOnly;
+
     static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, ThrowingDefault>>::value, "");
     static_assert(!std::is_nothrow_default_constructible<std::pair<NonThrowingDefault, ThrowingDefault>>::value, "");
     static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, NonThrowingDefault>>::value, "");