+template<typename F>
+struct LexicalCast<std::string, F>
+{
+ static std::string cast(const F &v, const Fmt &f = Fmt())
+ {
+ LexicalConverter conv(f);
+ conv<<v;
+ return conv.get();
+ }
+};
+
+template<>
+struct LexicalCast<std::string, std::string>
+{
+ static std::string cast(const std::string &v, const Fmt &f = Fmt())
+ {
+ LexicalConverter conv(f);
+ conv<<v;
+ return conv.get();
+ }
+};
+
+/** Perform a lexical conversion between a string and another type. The source
+type can normally be deduced by the compiler, so this can be used just like the
+standard C++ casts. A format may additionally be specified to force a specific
+interpretation. */
+template<typename T, typename F>
+inline T lexical_cast(const F &v, const Fmt &f = Fmt())