From Jason Turner

[allocator.uses.construction]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpy_5qztsk/{from.md → to.md} +12 -13
tmp/tmpy_5qztsk/{from.md → to.md} RENAMED
@@ -1,24 +1,23 @@
1
- #### uses-allocator construction <a id="allocator.uses.construction">[[allocator.uses.construction]]</a>
2
 
3
  *Uses-allocator construction* with allocator `Alloc` refers to the
4
  construction of an object `obj` of type `T`, using constructor arguments
5
  `v1, v2, ..., vN` of types `V1, V2, ..., VN`, respectively, and an
6
  allocator `alloc` of type `Alloc`, according to the following rules:
7
 
8
- - if `uses_allocator<T, Alloc>::value` is `false` and
9
- `is_constructible<T, V1, V2, ..., VN>::value` is `true`, then `obj` is
10
  initialized as `obj(v1, v2, ..., vN)`;
11
- - otherwise, if `uses_allocator<T, Alloc>::value` is `true` and
12
- `is_constructible<T, allocator_arg_t, Alloc,`
13
- `V1, V2, ..., VN>::value` is `true`, then `obj` is initialized as
14
- `obj(allocator_arg, alloc, v1,
15
  v2, ..., vN)`;
16
- - otherwise, if `uses_allocator<T, Alloc>::value` is `true` and
17
- `is_constructible<T, V1, V2, ..., VN, Alloc>::value` is `true`, then
18
- `obj` is initialized as `obj(v1, v2, ..., vN, alloc)`;
19
  - otherwise, the request for uses-allocator construction is ill-formed.
20
- An error will result if `uses_allocator<T, Alloc>::value` is `true`
21
- but the specific constructor does not take an allocator. This
22
  definition prevents a silent failure to pass the allocator to an
23
- element.
24
 
 
1
+ #### Uses-allocator construction <a id="allocator.uses.construction">[[allocator.uses.construction]]</a>
2
 
3
  *Uses-allocator construction* with allocator `Alloc` refers to the
4
  construction of an object `obj` of type `T`, using constructor arguments
5
  `v1, v2, ..., vN` of types `V1, V2, ..., VN`, respectively, and an
6
  allocator `alloc` of type `Alloc`, according to the following rules:
7
 
8
+ - if `uses_allocator_v<T, Alloc>` is `false` and
9
+ `is_constructible_v<T, V1, V2, ..., VN>` is `true`, then `obj` is
10
  initialized as `obj(v1, v2, ..., vN)`;
11
+ - otherwise, if `uses_allocator_v<T, Alloc>` is `true` and
12
+ `is_constructible_v<T, allocator_arg_t, Alloc,` `V1, V2, ..., VN>` is
13
+ `true`, then `obj` is initialized as `obj(allocator_arg, alloc, v1,
 
14
  v2, ..., vN)`;
15
+ - otherwise, if `uses_allocator_v<T, Alloc>` is `true` and
16
+ `is_constructible_v<T, V1, V2, ..., VN, Alloc>` is `true`, then `obj`
17
+ is initialized as `obj(v1, v2, ..., vN, alloc)`;
18
  - otherwise, the request for uses-allocator construction is ill-formed.
19
+ \[*Note 1*: An error will result if `uses_allocator_v<T, Alloc>` is
20
+ `true` but the specific constructor does not take an allocator. This
21
  definition prevents a silent failure to pass the allocator to an
22
+ element. — *end note*]
23