When I declare a condition_variable
, it may throw std::system_error
.
But how about when I declare a POD type (e.g. int
, double
or float
)?
Like the code below:
int main()
{
//do something
int i; //will here throw exception?
}
If declaring a POD type may throw exception, how do I guarantee
void test() noexcept
{
//do something
int i;
}
is noexcept
?