#include <vector>
#include <msp/strings/lexicalcast.h>
-#include "error.h"
+#include "except.h"
namespace Msp {
namespace DataFile {
if(!check_type<TypeResolver<T>::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<T>(data);
}
template<>