|
2 | 2 | #ifndef _GHLIBCPP_LOCALE
|
3 | 3 | #define _GHLIBCPP_LOCALE
|
4 | 4 |
|
| 5 | +#include <string> |
| 6 | + |
5 | 7 | namespace std {
|
6 | 8 |
|
7 |
| -class locale {}; |
| 9 | +class locale { |
| 10 | +public: |
| 11 | + class facet; |
| 12 | + class id; |
| 13 | + typedef int category; |
| 14 | + |
| 15 | + static const category none = 0, collate = 0x010, ctype = 0x020, |
| 16 | + monetary = 0x040, numeric = 0x080, time = 0x100, |
| 17 | + messages = 0x200, |
| 18 | + all = collate | ctype | monetary | numeric | time | |
| 19 | + messages; |
| 20 | + |
| 21 | + locale() noexcept; |
| 22 | + locale(const locale &other) noexcept; |
| 23 | + explicit locale(const char *std_name); |
| 24 | + explicit locale(const string &std_name); |
| 25 | + locale(const locale &other, const char *std_name, category); |
| 26 | + locale(const locale &other, const string &std_name, category); |
| 27 | + template <class Facet> locale(const locale &other, Facet *f); |
| 28 | + locale(const locale &other, const locale &one, category); |
| 29 | + ~locale(); |
| 30 | + const locale &operator=(const locale &other) noexcept; |
| 31 | + template <class Facet> locale combine(const locale &other) const; |
| 32 | + |
| 33 | + basic_string<char> name() const; |
| 34 | + |
| 35 | + bool operator==(const locale &other) const; |
| 36 | + bool operator!=(const locale &other) const; |
| 37 | + template <class charT, class traits, class Allocator> |
| 38 | + bool operator()(const basic_string<charT, traits, Allocator> &s1, |
| 39 | + const basic_string<charT, traits, Allocator> &s2) const; |
| 40 | + |
| 41 | + static locale global(const locale &); |
| 42 | + static const locale &classic(); |
| 43 | +}; |
8 | 44 |
|
9 | 45 | template <class charT> bool isspace(charT c, const locale &loc);
|
10 | 46 | template <class charT> bool isprint(charT c, const locale &loc);
|
|
0 commit comments