From 17b65c0d584ad7860aabdcadca6abc816d860929 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 11 Dec 2018 15:27:10 +0000 Subject: [PATCH] [libcxx] Fix test failure on GCC 4.9 GCC 4.9 seems to think that a constexpr default constructor implies the constructor to be noexcept. llvm-svn: 348850 --- .../utilities/utility/pairs/pairs.pair/default.pass.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp index 07425cf..2dbf551 100644 --- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp @@ -18,12 +18,17 @@ #include #include -#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>::value, ""); static_assert(!std::is_nothrow_default_constructible>::value, ""); static_assert(!std::is_nothrow_default_constructible>::value, ""); -- 2.7.4