]> git.lyx.org Git - lyx.git/blob - src/support/numpunct_lyx_char_type.h
build with msvc10. Seems there is a bug in their STL code:
[lyx.git] / src / support / numpunct_lyx_char_type.h
1 // -*- C++ -*-\r
2 /**\r
3  * \file numpunct_lyx_char_type.h\r
4  * This file is part of LyX, the document processor.\r
5  * Licence details can be found in the file COPYING.\r
6  *\r
7  * \author Peter Kümmel\r
8  *\r
9  * Full author contact details are available in file CREDITS.\r
10  */\r
11 \r
12 #ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H\r
13 #define LYX_NUMPUNCT_LYX_CHAR_TYPE_H\r
14 \r
15 \r
16 #include <locale>\r
17 \r
18 \r
19 namespace std\r
20 {\r
21 \r
22         template<>\r
23         class numpunct<lyx::char_type> : public locale::facet\r
24         {\r
25         public:\r
26 \r
27                 typedef lyx::char_type char_type;\r
28                 typedef basic_string<lyx::char_type> string_type;\r
29 \r
30 \r
31                 static locale::id                       id;\r
32 \r
33                 explicit numpunct(size_t __refs = 0) : chared(__refs)\r
34                 {}\r
35 \r
36                 char_type decimal_point() const\r
37                 { return chared.decimal_point(); }\r
38 \r
39                 char_type thousands_sep() const\r
40                 { return chared.thousands_sep(); }\r
41 \r
42                 string grouping() const\r
43                 { return chared.grouping(); }\r
44 \r
45                 string_type truename() const\r
46                 { return lyx::from_ascii(chared.truename()); }\r
47 \r
48                 string_type falsename() const\r
49                 { return lyx::from_ascii(chared.falsename()); }\r
50 \r
51 \r
52         protected:\r
53                 virtual ~numpunct();\r
54 \r
55 \r
56         private:\r
57                 numpunct<char> chared;\r
58 \r
59         };\r
60 \r
61 \r
62 \r
63 }\r
64 #endif\r