]> git.tdb.fi Git - libs/datafile.git/commitdiff
Add the target type to lexical_cast invocations
authorMikko Rasa <tdb@tdb.fi>
Sat, 1 Dec 2012 09:32:19 +0000 (11:32 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 1 Dec 2012 09:32:19 +0000 (11:32 +0200)
source/textwriter.cpp
source/type.h

index 5212c9760488330de78807ab7e4eb97bc3727827..c870ba0c20d7888f19725761924171c6b01662d9 100644 (file)
@@ -37,7 +37,7 @@ void TextWriter::write_(const Statement &st, unsigned level)
                else if(i->get_signature()==BoolType::signature)
                        out.write(i->get<BoolType::Store>() ? "true" : "false");
                else if(i->get_signature()==IntType::signature)
-                       out.write(lexical_cast(i->get<IntType::Store>()));
+                       out.write(lexical_cast<string>(i->get<IntType::Store>()));
                else if(i->get_signature()==FloatType::signature)
                        out.write(format(float_format, i->get<FloatType::Store>()));
                else if(i->get_signature()==SymbolType::signature)
index 85cfec40f2afc9aa79f38d646baf64dea473cd0a..17545bae23ef0922669583344097a65c3e3e04cd 100644 (file)
@@ -12,7 +12,7 @@ struct Symbol
        std::string name;
 
        template<typename T>
-       Symbol(const T &n): name(lexical_cast(n)) { }
+       Symbol(const T &n): name(lexical_cast<std::string>(n)) { }
 
        template<typename T> operator T() const { return lexical_cast<T>(name); }
 };