From Jason Turner

[string.require]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvssldrp3/{from.md → to.md} +14 -11
tmp/tmpvssldrp3/{from.md → to.md} RENAMED
@@ -1,28 +1,31 @@
1
- #### `basic_string` general requirements <a id="string.require">[[string.require]]</a>
2
 
3
  If any operation would cause `size()` to exceed `max_size()`, that
4
- operation shall throw an exception object of type `length_error`.
5
 
6
  If any member function or operator of `basic_string` throws an
7
- exception, that function or operator shall have no other effect.
 
8
 
9
  In every specialization `basic_string<charT, traits, Allocator>`, the
10
  type `allocator_traits<Allocator>::value_type` shall name the same type
11
  as `charT`. Every object of type
12
- `basic_string<charT, traits, Allocator>` shall use an object of type
13
  `Allocator` to allocate and free storage for the contained `charT`
14
- objects as needed. The `Allocator` object used shall be obtained as
15
- described in [[container.requirements.general]]. In every specialization
16
- `basic_string<charT, traits, Allocator>`, the type `traits` shall
17
- satisfy the character traits requirements ([[char.traits]]), and the
18
- type `traits::char_type` shall name the same type as `charT`.
 
 
19
 
20
  References, pointers, and iterators referring to the elements of a
21
  `basic_string` sequence may be invalidated by the following uses of that
22
  `basic_string` object:
23
 
24
- - as an argument to any standard library function taking a reference to
25
- non-const `basic_string` as an argument.[^3]
26
  - Calling non-const member functions, except `operator[]`, `at`, `data`,
27
  `front`, `back`, `begin`, `rbegin`, `end`, and `rend`.
28
 
 
1
+ #### General requirements <a id="string.require">[[string.require]]</a>
2
 
3
  If any operation would cause `size()` to exceed `max_size()`, that
4
+ operation throws an exception object of type `length_error`.
5
 
6
  If any member function or operator of `basic_string` throws an
7
+ exception, that function or operator has no other effect on the
8
+ `basic_string` object.
9
 
10
  In every specialization `basic_string<charT, traits, Allocator>`, the
11
  type `allocator_traits<Allocator>::value_type` shall name the same type
12
  as `charT`. Every object of type
13
+ `basic_string<charT, traits, Allocator>` uses an object of type
14
  `Allocator` to allocate and free storage for the contained `charT`
15
+ objects as needed. The `Allocator` object used is obtained as described
16
+ in [[container.requirements.general]]. In every specialization
17
+ `basic_string<charT, traits, Allocator>`, the type `traits` shall meet
18
+ the character traits requirements [[char.traits]].
19
+
20
+ [*Note 1*: The program is ill-formed if `traits::char_type` is not the
21
+ same type as `charT`. — *end note*]
22
 
23
  References, pointers, and iterators referring to the elements of a
24
  `basic_string` sequence may be invalidated by the following uses of that
25
  `basic_string` object:
26
 
27
+ - Passing as an argument to any standard library function taking a
28
+ reference to non-const `basic_string` as an argument.[^2]
29
  - Calling non-const member functions, except `operator[]`, `at`, `data`,
30
  `front`, `back`, `begin`, `rbegin`, `end`, and `rend`.
31