4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
12 * A collection of string helper functions that works with string.
13 * Some of these would certainly benefit from a rewrite/optimization.
19 #include <boost/static_assert.hpp>
23 template <class Target, class Source>
24 Target convert(Source arg)
26 // We use a static assert here since we want all instances of
27 // this template to be specializations.
28 BOOST_STATIC_ASSERT(sizeof(bool) == 0);
33 std::string convert<std::string>(bool);
36 std::string convert<std::string>(char);
39 std::string convert<std::string>(unsigned short);
42 std::string convert<std::string>(int);
45 std::string convert<std::string>(unsigned int);
48 std::string convert<std::string>(float);
51 std::string convert<std::string>(double);
54 std::string convert<std::string>(std::string);