X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fvalue.h;h=ace18945cbc2ea39eb4bc395cc116c0016b8e7e0;hp=4b3ac4192b400f58388716d5baeaee7f243cb759;hb=9527722cbf433e25dcdf9210271af876a85910c7;hpb=8a177740d8a02174bd2a93a926c76d2133d25d9f diff --git a/source/value.h b/source/value.h index 4b3ac41..ace1894 100644 --- a/source/value.h +++ b/source/value.h @@ -69,14 +69,7 @@ inline T Value::get() const if(!check_type::type>(type)) throw TypeError("Type mismatch"); - std::istringstream ss(data); - T result; - ss>>result; - if(ss.fail()) - //XXX - throw Exception("Invalid value"); - - return result; + return lexical_cast(data); } template<>