optional: Implement LWG 2900 and P0602
Differential Revision: https://reviews.llvm.org/D32385 llvm-svn: 307505
This commit is contained in:
@@ -55,10 +55,10 @@ constexpr bool constexpr_test(InitArgs&&... args)
|
||||
void test_throwing_ctor() {
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
struct Z {
|
||||
Z() : count(0) {}
|
||||
Z(Z&& o) : count(o.count + 1)
|
||||
{ if (count == 2) throw 6; }
|
||||
int count;
|
||||
Z() : count(0) {}
|
||||
Z(Z&& o) : count(o.count + 1)
|
||||
{ if (count == 2) throw 6; }
|
||||
int count;
|
||||
};
|
||||
Z z;
|
||||
optional<Z> rhs(std::move(z));
|
||||
|
||||
Reference in New Issue
Block a user