Здравствуйте, godplayer, Вы писали:
G>nested.cpp(34): error C2676: binary '<<' : 'module_error::bad_config' does not define this operator or a conversion to a type acceptable to the predefined operator
G>Можно ли это как-то побороть?
Вроде бы по стандарту необходимо реализовывать свободную функцию вне класса:
class base_exception
{
public:
template <class E> friend E const& operator<<(E const& ex, std::string const& str);
...
private:
mutable std::string m_what;
};
template <class E> E const& operator<<(E const& ex, std::string const& str)
{
ex.m_what += str;
return ex;
}