Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and 2838 as complete - since we do them already

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2017-03-14 17:08:47 +00:00
parent dd1f05915f
commit abba685fcd
3 changed files with 51 additions and 16 deletions

View File

@@ -46,12 +46,19 @@ public:
C * operator&() const { assert(false); } // should not be called
};
class D : private std::nested_exception {};
class E1 : public std::nested_exception {};
class E2 : public std::nested_exception {};
class E : public E1, public E2 {};
int main()
{
{
try
{
A a(3);
A a(3); // not a polymorphic type --> no effect
std::rethrow_if_nested(a);
assert(true);
}
@@ -60,6 +67,30 @@ int main()
assert(false);
}
}
{
try
{
D s; // inaccessible base class --> no effect
std::rethrow_if_nested(s);
assert(true);
}
catch (...)
{
assert(false);
}
}
{
try
{
E s; // ambiguous base class --> no effect
std::rethrow_if_nested(s);
assert(true);
}
catch (...)
{
assert(false);
}
}
{
try
{