ALiX wrote:
Vladimir Prus
writes: In my programs, can I safely rely on the fact that error inherits from std::logic_error, and so comfortably use the what() function to extract the error messages? Might this change in later implementations?
I don't plan any such change in a foreseeable future.
Great! Thanks for the answer. I assume that even if a change would be made later, the error class would still have the what()-function (otherwise, the constructor argument would be meaningless).
The only reason for changing a base class will be appearance of some boost::exception, with support for i18n messages and what not. I surely expect such a boost::exception to have the 'what()' method, otherwise it won't be of much use. In any case, I don't think there's boost::exception around yet. - Volodya