From Jason Turner

[range.prim.size.hint]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmphh8pkzu6/{from.md → to.md} +27 -0
tmp/tmphh8pkzu6/{from.md → to.md} RENAMED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `ranges::reserve_hint` <a id="range.prim.size.hint">[[range.prim.size.hint]]</a>
2
+
3
+ The name `ranges::reserve_hint` denotes a customization point object
4
+ [[customization.point.object]].
5
+
6
+ Given a subexpression `E` with type `T`, let `t` be an lvalue that
7
+ denotes the reified object for `E`. Then:
8
+
9
+ - If `ranges::size(E)` is a valid expression, `ranges::reserve_hint(E)`
10
+ is expression-equivalent to `ranges::size(E)`.
11
+ - Otherwise, if `auto(t.reserve_hint())` is a valid expression of
12
+ integer-like type [[iterator.concept.winc]], `ranges::reserve_hint(E)`
13
+ is expression-equivalent to `auto(t.reserve_hint())`.
14
+ - Otherwise, if `T` is a class or enumeration type and
15
+ `auto(reserve_hint(t))` is a valid expression of integer-like type
16
+ where the meaning of `reserve_hint` is established as-if by performing
17
+ argument-dependent lookup only [[basic.lookup.argdep]], then
18
+ `ranges::reserve_hint(E)` is expression-equivalent to that expression.
19
+ - Otherwise, `ranges::reserve_hint(E)` is ill-formed.
20
+
21
+ [*Note 1*: Diagnosable ill-formed cases above result in substitution
22
+ failure when `ranges::reserve_hint(E)` appears in the immediate context
23
+ of a template instantiation. — *end note*]
24
+
25
+ [*Note 2*: Whenever `ranges::reserve_hint(E)` is a valid expression,
26
+ its type is integer-like. — *end note*]
27
+