X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Flexicalcast.h;h=22b45e88c55eef60e433b6253d0070b77c9242a5;hp=13eab45f0b81c9311381f43f880caf2abb5fcf5b;hb=4f04dc8e2dcb48d524c141cb14ce05b655608454;hpb=e83bcaa01b98b600171886ff6b06d884385dd0ed diff --git a/source/strings/lexicalcast.h b/source/strings/lexicalcast.h index 13eab45..22b45e8 100644 --- a/source/strings/lexicalcast.h +++ b/source/strings/lexicalcast.h @@ -97,7 +97,7 @@ struct CheckFormattedOutput: Sfinae { static std::ostream &s; template - static Yes f(int (*)[sizeof(s<(s))]); using Sfinae::f; }; @@ -118,7 +118,7 @@ typename EnableIf::value, void>::Yes operator<<(LexicalConverter &c, const T &v) { std::ostringstream ss; - ss<>(const LexicalConverter &c, T &v) { std::istringstream ss(c.get()); ss.setf(std::ios_base::fmtflags(0), std::ios_base::skipws); - ss>>v; + ss >> v; if(ss.fail() || !ss.eof()) throw lexical_error("conversion failure"); } @@ -146,7 +146,7 @@ struct LexicalCast { LexicalConverter conv(s, f); T result; - conv>>result; + conv >> result; return result; } }; @@ -157,7 +157,7 @@ struct LexicalCast static std::string cast(const F &v, const Fmt &f = Fmt()) { LexicalConverter conv(f); - conv< static std::string cast(const std::string &v, const Fmt &f = Fmt()) { LexicalConverter conv(f); - conv<