From Jason Turner

[category.messages]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpoxplljx3/{from.md → to.md} +9 -12
tmp/tmpoxplljx3/{from.md → to.md} RENAMED
@@ -7,18 +7,18 @@ catalogs.
7
 
8
  ``` cpp
9
  namespace std {
10
  class messages_base {
11
  public:
12
- typedef unspecified signed integer type catalog;
13
  };
14
 
15
  template <class charT>
16
  class messages : public locale::facet, public messages_base {
17
  public:
18
- typedef charT char_type;
19
- typedef basic_string<charT> string_type;
20
 
21
  explicit messages(size_t refs = 0);
22
 
23
  catalog open(const basic_string<char>& fn, const locale&) const;
24
  string_type get(catalog c, int set, int msgid,
@@ -47,12 +47,11 @@ catalog open(const basic_string<char>& name, const locale& loc) const;
47
  ```
48
 
49
  *Returns:* `do_open(name, loc)`.
50
 
51
  ``` cpp
52
- string_type get(catalog cat, int set, int msgid,
53
- const string_type& dfault) const;
54
  ```
55
 
56
  *Returns:* `do_get(cat, set, msgid, dfault)`.
57
 
58
  ``` cpp
@@ -62,12 +61,11 @@ void close(catalog cat) const;
62
  *Effects:* Calls `do_close(cat)`.
63
 
64
  ##### `messages` virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
65
 
66
  ``` cpp
67
- catalog do_open(const basic_string<char>& name,
68
- const locale& loc) const;
69
  ```
70
 
71
  *Returns:* A value that may be passed to `get()` to retrieve a message
72
  from the message catalog identified by the string `name` according to an
73
  *implementation-defined* mapping. The result can be used until it is
@@ -77,12 +75,11 @@ Returns a value less than 0 if no such catalog can be opened.
77
 
78
  *Remarks:* The locale argument `loc` is used for character set code
79
  conversion when retrieving messages, if needed.
80
 
81
  ``` cpp
82
- string_type do_get(catalog cat, int set, int msgid,
83
- const string_type& dfault) const;
84
  ```
85
 
86
  *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
87
  closed.
88
 
@@ -98,21 +95,21 @@ void do_close(catalog cat) const;
98
  closed.
99
 
100
  *Effects:* Releases unspecified resources associated with `cat`.
101
 
102
  *Remarks:* The limit on such resources, if any, is
103
- implementation-defined.
104
 
105
  #### Class template `messages_byname` <a id="locale.messages.byname">[[locale.messages.byname]]</a>
106
 
107
  ``` cpp
108
  namespace std {
109
  template <class charT>
110
  class messages_byname : public messages<charT> {
111
  public:
112
- typedef messages_base::catalog catalog;
113
- typedef basic_string<charT> string_type;
114
 
115
  explicit messages_byname(const char*, size_t refs = 0);
116
  explicit messages_byname(const string&, size_t refs = 0);
117
  protected:
118
  ~messages_byname();
 
7
 
8
  ``` cpp
9
  namespace std {
10
  class messages_base {
11
  public:
12
+ using catalog = unspecified signed integer type;
13
  };
14
 
15
  template <class charT>
16
  class messages : public locale::facet, public messages_base {
17
  public:
18
+ using char_type = charT;
19
+ using string_type = basic_string<charT>;
20
 
21
  explicit messages(size_t refs = 0);
22
 
23
  catalog open(const basic_string<char>& fn, const locale&) const;
24
  string_type get(catalog c, int set, int msgid,
 
47
  ```
48
 
49
  *Returns:* `do_open(name, loc)`.
50
 
51
  ``` cpp
52
+ string_type get(catalog cat, int set, int msgid, const string_type& dfault) const;
 
53
  ```
54
 
55
  *Returns:* `do_get(cat, set, msgid, dfault)`.
56
 
57
  ``` cpp
 
61
  *Effects:* Calls `do_close(cat)`.
62
 
63
  ##### `messages` virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
64
 
65
  ``` cpp
66
+ catalog do_open(const basic_string<char>& name, const locale& loc) const;
 
67
  ```
68
 
69
  *Returns:* A value that may be passed to `get()` to retrieve a message
70
  from the message catalog identified by the string `name` according to an
71
  *implementation-defined* mapping. The result can be used until it is
 
75
 
76
  *Remarks:* The locale argument `loc` is used for character set code
77
  conversion when retrieving messages, if needed.
78
 
79
  ``` cpp
80
+ string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
 
81
  ```
82
 
83
  *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
84
  closed.
85
 
 
95
  closed.
96
 
97
  *Effects:* Releases unspecified resources associated with `cat`.
98
 
99
  *Remarks:* The limit on such resources, if any, is
100
+ *implementation-defined*.
101
 
102
  #### Class template `messages_byname` <a id="locale.messages.byname">[[locale.messages.byname]]</a>
103
 
104
  ``` cpp
105
  namespace std {
106
  template <class charT>
107
  class messages_byname : public messages<charT> {
108
  public:
109
+ using catalog = messages_base::catalog;
110
+ using string_type = basic_string<charT>;
111
 
112
  explicit messages_byname(const char*, size_t refs = 0);
113
  explicit messages_byname(const string&, size_t refs = 0);
114
  protected:
115
  ~messages_byname();