1 | #ifndef __LEXICAL_CAST_HH__␊ |
2 | #define __LEXICAL_CAST_HH__␊ |
3 | ␊ |
4 | // Copyright (C) 2007 Timothy Brownawell <tbrownaw@gmail.com>␊ |
5 | //␊ |
6 | // This program is made available under the GNU GPL version 2.0 or␊ |
7 | // greater. See the accompanying file COPYING for details.␊ |
8 | //␊ |
9 | // This program is distributed WITHOUT ANY WARRANTY; without even the␊ |
10 | // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR␊ |
11 | // PURPOSE.␊ |
12 | ␊ |
13 | ␊ |
14 | #include <boost/lexical_cast.hpp>␊ |
15 | ␊ |
16 | // Generic lexical_cast can be a bit slow sometimes. If a particular␊ |
17 | // version shows up in profiles, consider writing a specialization.␊ |
18 | // Note: because we do this, every file that uses boost::lexical_cast␊ |
19 | // _must_ include this file instead of <boost/lexical_cast.hpp>, or we␊ |
20 | // risk violating the One Definition Rule (if some file instantiates␊ |
21 | // the generic template for the types we specialize here). This is not␊ |
22 | // a theoretical problem; the Windows linker will fail.␊ |
23 | ␊ |
24 | namespace boost {␊ |
25 | template<>␊ |
26 | std::string lexical_cast<std::string, unsigned int>(unsigned int const & _i);␊ |
27 | ␊ |
28 | template<>␊ |
29 | unsigned int lexical_cast<unsigned int, std::string>(std::string const & s);␊ |
30 | ␊ |
31 | }␊ |
32 | ␊ |
33 | #endif␊ |
34 | ␊ |
35 | // Local Variables:␊ |
36 | // mode: C++␊ |
37 | // fill-column: 76␊ |
38 | // c-file-style: "gnu"␊ |
39 | // indent-tabs-mode: nil␊ |
40 | // End:␊ |
41 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:␊ |