Lets consider I have the following function:
SomeType createSomeType();
which can throw
depending on some reasons.
Then:
SomeType val = SomeType(); // initial value
try
{
val = createSomeType(); // here
}
catch (std::exception&)
{
}
If createSomeType()
throws, can I always assume that val
value is unchanged ?