forked from OSchip/llvm-project
[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
This commit is contained in:
parent
d1e3fe2190
commit
17b65c0d58
|
@ -18,12 +18,17 @@
|
|||
#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, "");
|
||||
|
|
Loading…
Reference in New Issue