From Jason Turner

[string.require]

Diff to HTML by rtfpessoa

tmp/tmpe9jes4vk/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
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
@@ -10,21 +10,19 @@ 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]].
16
-
17
- The char-like objects in a `basic_string` object shall be stored
18
- contiguously. That is, for any `basic_string` object `s`, the identity
19
- `&*(s.begin() + n) == &*s.begin() + n` shall hold for all values of `n`
20
- such that `0 <= n < s.size()`.
21
 
22
  References, pointers, and iterators referring to the elements of a
23
  `basic_string` sequence may be invalidated by the following uses of that
24
  `basic_string` object:
25
 
26
  - as an argument to any standard library function taking a reference to
27
  non-const `basic_string` as an argument.[^3]
28
- - Calling non-const member functions, except `operator[]`, `at`,
29
  `front`, `back`, `begin`, `rbegin`, `end`, and `rend`.
30
 
 
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
 
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