LexicalError(const std::string &w_): Exception(w_) { }
};
+
/**
Helper class for lexical_cast to facilitate operator overloading.
*/
void result(const std::string &);
};
+
void operator<<(LexicalConverter &, char);
void operator<<(LexicalConverter &, signed char);
void operator<<(LexicalConverter &, short);
// The main interface to the lexical conversion machinery
template<typename T>
-inline T lexical_cast(const std::string &s, const Fmt &f=Fmt())
+inline T lexical_cast(const std::string &s, const Fmt &f = Fmt())
{
LexicalConverter conv(s, f);
T result;
}
template<typename T>
-inline std::string lexical_cast(const T &v, const Fmt &f=Fmt())
+inline std::string lexical_cast(const T &v, const Fmt &f = Fmt())
{
LexicalConverter conv(f);
conv<<v;