Give A an explicitly non-throwing destructor so that B's destructor is
itself non-throwing. Since nested_exception's destructor is non-throwing, if B's destructor is not, this causes an error in C++03 mode due to the overriding function having a more lax specification. This did not occur in C++0x mode as A's destructor was implicitly non-throwing. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135400 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,7 +22,7 @@ class A
|
|||||||
int data_;
|
int data_;
|
||||||
public:
|
public:
|
||||||
explicit A(int data) : data_(data) {}
|
explicit A(int data) : data_(data) {}
|
||||||
virtual ~A() {}
|
virtual ~A() _NOEXCEPT {}
|
||||||
|
|
||||||
friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;}
|
friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user