Reputation: 56956
Is it possible to throw an instance of std::bad_cast
? The underlying question is not whether it is good or not to do this, it is only about whether std::bad_cast
has a default constructor or not.
Thanks
Upvotes: 3
Views: 1977
Reputation: 279265
18.5.2 of the C++ standard says "yes", it has a no-arg constructor.
Upvotes: 7