]> git.lyx.org Git - lyx.git/blob - src/support/tostr.C
* lyxfunctional.h: delete compare_memfun and helper classes
[lyx.git] / src / support / tostr.C
1 /**
2  * \file tostr.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include <boost/lexical_cast.hpp>
15
16
17 using boost::lexical_cast;
18
19 using std::string;
20
21
22 string const tostr(bool b)
23 {
24         return (b ? "true" : "false");
25 }
26
27
28 string const tostr(unsigned int i)
29 {
30         return lexical_cast<string>(i);
31 }
32
33
34 string const tostr(long int i)
35 {
36         return lexical_cast<string>(i);
37 }
38
39
40 string const tostr(double d)
41 {
42         return lexical_cast<string>(d);
43 }
44
45
46 string const tostr(int i)
47 {
48         return lexical_cast<string>(i);
49 }
50
51
52 string const tostr(string const & s)
53 {
54         return s;
55 }
56
57
58 string const tostr(long unsigned int i)
59 {
60         return lexical_cast<string>(i);
61 }