First example I could find: bearing.hpp, marks the get function with noexcept, guaranteeing to never throw. If the function does throw, the program gets terminated.
The problem here is that std::string can indeed throw in its constructor (e.g. in the out of memory case). This is just an example based on the first occurrence I could fine --- have to check all of them.
References:
First example I could find: bearing.hpp, marks the
getfunction withnoexcept, guaranteeing to never throw. If the function does throw, the program gets terminated.The problem here is that
std::stringcan indeed throw in its constructor (e.g. in the out of memory case). This is just an example based on the first occurrence I could fine --- have to check all of them.References: