]> git.lyx.org Git - lyx.git/blob - src/support/numpunct_lyx_char_type.h
Account for old versions of Pygments
[lyx.git] / src / support / numpunct_lyx_char_type.h
1 // -*- C++ -*-
2 /**
3  * \file numpunct_lyx_char_type.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H
13 #define LYX_NUMPUNCT_LYX_CHAR_TYPE_H
14
15
16 #include <locale>
17
18
19 namespace std
20 {
21
22         template<>
23         class numpunct<lyx::char_type> : public numpunct<char>
24         {
25         public:
26
27                 typedef lyx::char_type char_type;
28                 typedef basic_string<lyx::char_type> string_type;
29
30                 static locale::id id;
31
32                 explicit numpunct(size_t __refs = 0) : numpunct<char>(__refs)
33                 {}
34
35                 char_type decimal_point() const
36                 { return numpunct<char>::decimal_point(); }
37
38                 char_type thousands_sep() const
39                 { return numpunct<char>::thousands_sep(); }
40
41                 string grouping() const
42                 { return numpunct<char>::grouping(); }
43
44                 // Implementation can be found in docstream.cpp
45                 string_type truename() const;
46                 string_type falsename() const;
47
48
49         protected:
50                 virtual ~numpunct();
51
52         };
53
54         // Fixed in VC11:
55         // http://connect.microsoft.com/VisualStudio/feedback/details/572376/msvc10-c-std-numpunct-has-a-hardcoded-dllimport-in-definition
56
57 }
58 #endif