I have a member function that doesn’t throw anything so i appended the throw() suffix to the end of it, indicating that it won’t throw any exceptions.
My question is, in the function I make use of several std::string, and lets say something goes wrong in the initialization of the std::string, and it throws bad_alloc or out_of_range (or what ever else can go wrong with a std::string).
Is it still safe to still add the throw() suffix?
Herb Sutter says that
It can cause more problems than bring benefits. So, you should think twise before doing that.