From 9527722cbf433e25dcdf9210271af876a85910c7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 15 Dec 2008 11:49:33 +0000 Subject: [PATCH] Use lexical_cast instead of istringstream in Value::get --- source/value.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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<> -- 2.45.2