// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -fcxx-exceptions %s
// An explicitly-defaulted function may be declared constexpr only if it would
// have been implicitly declared as constexpr.
;
;
;
// If a function is explicitly defaulted on its first declaration
// -- it is implicitly considered to be constexpr if the implicit declaration
// would be
;
constexpr S3 s3a = ;
constexpr S3 s3b = s3a;
constexpr S3 s3c = ;
constexpr S3 s3d; // expected-error {{default initialization of an object of const type 'const S3' without a user-provided default constructor}}
;
constexpr S4 s4a; // ok
constexpr S4 s4b = ; // expected-error {{constant expression}} expected-note {{non-constexpr constructor}}
constexpr S4 s4c = s4a; // expected-error {{constant expression}} expected-note {{non-constexpr constructor}}
;
constexpr ;
static_assert;
// An explicitly-defaulted function may have a different exception specification
// from the exception specification on an implicit declaration.
;
;
E2 e2;
E2 ;
void ;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
// FIXME: This expression results in destruction of an E2 temporary; the
// noexcept expression should evaluate to false.
static_assert;
// If a function is explicitly defaulted on its first declaration
// -- it is implicitly considered to have the same exception-specification as
// if it had been implicitly declared
;
E3 e3;
static_assert;
;
;
E5 e5;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;