Fix a problem when calling throw_with_nested with a class marked 'final'. Thanks to STL @ Microsoft for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -36,6 +36,10 @@ public:
|
||||
friend bool operator==(const B& x, const B& y) {return x.data_ == y.data_;}
|
||||
};
|
||||
|
||||
#if __cplusplus > 201103L
|
||||
struct Final final {};
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -100,4 +104,16 @@ int main()
|
||||
assert(i == 7);
|
||||
}
|
||||
}
|
||||
#if __cplusplus > 201103L
|
||||
{
|
||||
try
|
||||
{
|
||||
std::throw_with_nested(Final());
|
||||
assert(false);
|
||||
}
|
||||
catch (const Final &f)
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user