From Jason Turner

[locale.messages]

Diff to HTML by rtfpessoa

tmp/tmpq2tka4ej/{from.md → to.md} RENAMED
@@ -13,34 +13,34 @@ namespace std {
13
  using char_type = charT;
14
  using string_type = basic_string<charT>;
15
 
16
  explicit messages(size_t refs = 0);
17
 
18
- catalog open(const basic_string<char>& fn, const locale&) const;
19
  string_type get(catalog c, int set, int msgid,
20
  const string_type& dfault) const;
21
  void close(catalog c) const;
22
 
23
  static locale::id id;
24
 
25
  protected:
26
  ~messages();
27
- virtual catalog do_open(const basic_string<char>&, const locale&) const;
28
  virtual string_type do_get(catalog, int set, int msgid,
29
  const string_type& dfault) const;
30
  virtual void do_close(catalog) const;
31
  };
32
  }
33
  ```
34
 
35
  Values of type `messages_base::catalog` usable as arguments to members
36
  `get` and `close` can be obtained only by calling member `open`.
37
 
38
- ##### `messages` members <a id="locale.messages.members">[[locale.messages.members]]</a>
39
 
40
  ``` cpp
41
- catalog open(const basic_string<char>& name, const locale& loc) const;
42
  ```
43
 
44
  *Returns:* `do_open(name, loc)`.
45
 
46
  ``` cpp
@@ -53,14 +53,14 @@ string_type get(catalog cat, int set, int msgid, const string_type& dfault) cons
53
  void close(catalog cat) const;
54
  ```
55
 
56
  *Effects:* Calls `do_close(cat)`.
57
 
58
- ##### `messages` virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
59
 
60
  ``` cpp
61
- catalog do_open(const basic_string<char>& name, const locale& loc) const;
62
  ```
63
 
64
  *Returns:* A value that may be passed to `get()` to retrieve a message
65
  from the message catalog identified by the string `name` according to an
66
  *implementation-defined* mapping. The result can be used until it is
@@ -73,22 +73,22 @@ conversion when retrieving messages, if needed.
73
 
74
  ``` cpp
75
  string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
76
  ```
77
 
78
- *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
79
  closed.
80
 
81
  *Returns:* A message identified by arguments `set`, `msgid`, and
82
  `dfault`, according to an *implementation-defined* mapping. If no such
83
  message can be found, returns `dfault`.
84
 
85
  ``` cpp
86
  void do_close(catalog cat) const;
87
  ```
88
 
89
- *Requires:* `cat` shall be a catalog obtained from `open()` and not yet
90
  closed.
91
 
92
  *Effects:* Releases unspecified resources associated with `cat`.
93
 
94
  *Remarks:* The limit on such resources, if any, is
 
13
  using char_type = charT;
14
  using string_type = basic_string<charT>;
15
 
16
  explicit messages(size_t refs = 0);
17
 
18
+ catalog open(const string& fn, const locale&) const;
19
  string_type get(catalog c, int set, int msgid,
20
  const string_type& dfault) const;
21
  void close(catalog c) const;
22
 
23
  static locale::id id;
24
 
25
  protected:
26
  ~messages();
27
+ virtual catalog do_open(const string&, const locale&) const;
28
  virtual string_type do_get(catalog, int set, int msgid,
29
  const string_type& dfault) const;
30
  virtual void do_close(catalog) const;
31
  };
32
  }
33
  ```
34
 
35
  Values of type `messages_base::catalog` usable as arguments to members
36
  `get` and `close` can be obtained only by calling member `open`.
37
 
38
+ ##### Members <a id="locale.messages.members">[[locale.messages.members]]</a>
39
 
40
  ``` cpp
41
+ catalog open(const string& name, const locale& loc) const;
42
  ```
43
 
44
  *Returns:* `do_open(name, loc)`.
45
 
46
  ``` cpp
 
53
  void close(catalog cat) const;
54
  ```
55
 
56
  *Effects:* Calls `do_close(cat)`.
57
 
58
+ ##### Virtual functions <a id="locale.messages.virtuals">[[locale.messages.virtuals]]</a>
59
 
60
  ``` cpp
61
+ catalog do_open(const string& name, const locale& loc) const;
62
  ```
63
 
64
  *Returns:* A value that may be passed to `get()` to retrieve a message
65
  from the message catalog identified by the string `name` according to an
66
  *implementation-defined* mapping. The result can be used until it is
 
73
 
74
  ``` cpp
75
  string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
76
  ```
77
 
78
+ *Preconditions:* `cat` is a catalog obtained from `open()` and not yet
79
  closed.
80
 
81
  *Returns:* A message identified by arguments `set`, `msgid`, and
82
  `dfault`, according to an *implementation-defined* mapping. If no such
83
  message can be found, returns `dfault`.
84
 
85
  ``` cpp
86
  void do_close(catalog cat) const;
87
  ```
88
 
89
+ *Preconditions:* `cat` is a catalog obtained from `open()` and not yet
90
  closed.
91
 
92
  *Effects:* Releases unspecified resources associated with `cat`.
93
 
94
  *Remarks:* The limit on such resources, if any, is