Fixes PR17148

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193772 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2013-10-31 17:23:08 +00:00
parent 4259337da2
commit 09f8550e1c
2 changed files with 8 additions and 2 deletions

View File

@@ -21,6 +21,12 @@ void
test(const S& s)
{
assert(s.max_size() >= s.size());
{
S s2;
try { s2.resize(s2.max_size() - 1, 'x'); }
catch ( const std::bad_alloc & ) { return ; }
assert ( false );
}
}
int main()