Skip to content

Commit 18e0143

Browse files
committed
Extend C++ stubs for locale
1 parent ed16770 commit 18e0143

File tree

1 file changed

+37
-1
lines changed
  • cpp/common/test/includes/standard-library

1 file changed

+37
-1
lines changed

cpp/common/test/includes/standard-library/locale

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,45 @@
22
#ifndef _GHLIBCPP_LOCALE
33
#define _GHLIBCPP_LOCALE
44

5+
#include <string>
6+
57
namespace std {
68

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+
};
844

945
template <class charT> bool isspace(charT c, const locale &loc);
1046
template <class charT> bool isprint(charT c, const locale &loc);

0 commit comments

Comments
 (0)