Merge pull request #306 from mitro42/fix_discussion_dtorneverfail

Fixed code indentation, numbering and typo in Discussion: Destructors…
This commit is contained in:
Gabriel Dos Reis
2015-10-09 10:54:00 -07:00

View File

@@ -13140,7 +13140,7 @@ Here, copying `s` could throw, and if that throws and if `n`'s destructor then a
void test(string& s)
{
innocent_bystander i; // more trouble brewing
string copy = s; // copy the string
string copy2 = s; // copy the string
} // destroy copy and then i
Here, if constructing `copy2` throws, we have the same problem because `i`'s destructor now also can throw, and if so we'll invoke `std::terminate`.