X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftype.h;h=242a9e11d1bed7c30cf8bbc978ff1b001133d74b;hb=e5d760ccfaaa01884be2424b62e47a24466e0c4b;hp=5a87a10222a84794341d9a167c94786ae022927f;hpb=a582163d380833b1370ba067a1fd0ad5c2984723;p=libs%2Fdatafile.git diff --git a/source/type.h b/source/type.h index 5a87a10..242a9e1 100644 --- a/source/type.h +++ b/source/type.h @@ -17,7 +17,8 @@ struct Symbol { std::string name; - Symbol(const std::string &n): name(n) { } + template + Symbol(const T &n): name(lexical_cast(n)) { } template operator T() const { return lexical_cast(name); } };