From Jason Turner

[type.index]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpkcdcd0vw/{from.md → to.md} +11 -304
tmp/tmpkcdcd0vw/{from.md → to.md} RENAMED
@@ -42,358 +42,65 @@ can be used as an index type in associative containers (
42
 
43
  ``` cpp
44
  type_index(const type_info& rhs) noexcept;
45
  ```
46
 
47
- *Effects:* constructs a `type_index` object, the equivalent of
48
  `target = &rhs`.
49
 
50
  ``` cpp
51
  bool operator==(const type_index& rhs) const noexcept;
52
  ```
53
 
54
- *Returns:* `*target == *rhs.target`
55
 
56
  ``` cpp
57
  bool operator!=(const type_index& rhs) const noexcept;
58
  ```
59
 
60
- *Returns:* `*target != *rhs.target`
61
 
62
  ``` cpp
63
  bool operator<(const type_index& rhs) const noexcept;
64
  ```
65
 
66
- *Returns:* `target->before(*rhs.target)`
67
 
68
  ``` cpp
69
  bool operator<=(const type_index& rhs) const noexcept;
70
  ```
71
 
72
- *Returns:* `!rhs.target->before(*target)`
73
 
74
  ``` cpp
75
  bool operator>(const type_index& rhs) const noexcept;
76
  ```
77
 
78
- *Returns:* `rhs.target->before(*target)`
79
 
80
  ``` cpp
81
  bool operator>=(const type_index& rhs) const noexcept;
82
  ```
83
 
84
- *Returns:* `!target->before(*rhs.target)`
85
 
86
  ``` cpp
87
  size_t hash_code() const noexcept;
88
  ```
89
 
90
- *Returns:* `target->hash_code()`
91
 
92
  ``` cpp
93
  const char* name() const noexcept;
94
  ```
95
 
96
- *Returns:* `target->name()`
97
 
98
  ### Hash support <a id="type.index.hash">[[type.index.hash]]</a>
99
 
100
  ``` cpp
101
  template <> struct hash<type_index>;
102
  ```
103
 
104
- The template specialization shall meet the requirements of class
105
- template `hash` ([[unord.hash]]). For an object `index` of type
106
- `type_index`, `hash<type_index>()(index)` shall evaluate to the same
107
- result as `index.hash_code()`.
108
 
109
- <!-- Link reference definitions -->
110
- [alg.sorting]: algorithms.md#alg.sorting
111
- [algorithms]: algorithms.md#algorithms
112
- [allocator.adaptor]: #allocator.adaptor
113
- [allocator.adaptor.cnstr]: #allocator.adaptor.cnstr
114
- [allocator.adaptor.members]: #allocator.adaptor.members
115
- [allocator.adaptor.syn]: #allocator.adaptor.syn
116
- [allocator.adaptor.types]: #allocator.adaptor.types
117
- [allocator.globals]: #allocator.globals
118
- [allocator.members]: #allocator.members
119
- [allocator.requirements]: library.md#allocator.requirements
120
- [allocator.tag]: #allocator.tag
121
- [allocator.traits]: #allocator.traits
122
- [allocator.traits.members]: #allocator.traits.members
123
- [allocator.traits.types]: #allocator.traits.types
124
- [allocator.uses]: #allocator.uses
125
- [allocator.uses.construction]: #allocator.uses.construction
126
- [allocator.uses.trait]: #allocator.uses.trait
127
- [arithmetic.operations]: #arithmetic.operations
128
- [array]: containers.md#array
129
- [associative]: containers.md#associative
130
- [atomics.order]: atomics.md#atomics.order
131
- [atomics.types.operations]: atomics.md#atomics.types.operations
132
- [basic.align]: basic.md#basic.align
133
- [basic.compound]: basic.md#basic.compound
134
- [basic.def.odr]: basic.md#basic.def.odr
135
- [basic.fundamental]: basic.md#basic.fundamental
136
- [basic.life]: basic.md#basic.life
137
- [basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
138
- [basic.type.qualifier]: basic.md#basic.type.qualifier
139
- [basic.types]: basic.md#basic.types
140
- [bitset.cons]: #bitset.cons
141
- [bitset.hash]: #bitset.hash
142
- [bitset.members]: #bitset.members
143
- [bitset.operators]: #bitset.operators
144
- [bitwise.operations]: #bitwise.operations
145
- [c.malloc]: #c.malloc
146
- [c.strings]: strings.md#c.strings
147
- [class]: class.md#class
148
- [class.abstract]: class.md#class.abstract
149
- [class.derived]: class.md#class.derived
150
- [class.dtor]: special.md#class.dtor
151
- [class.virtual]: class.md#class.virtual
152
- [comparisons]: #comparisons
153
- [conv.array]: conv.md#conv.array
154
- [conv.func]: conv.md#conv.func
155
- [conv.lval]: conv.md#conv.lval
156
- [conv.rank]: conv.md#conv.rank
157
- [copyassignable]: #copyassignable
158
- [copyconstructible]: #copyconstructible
159
- [date.time]: #date.time
160
- [dcl.array]: dcl.md#dcl.array
161
- [dcl.enum]: dcl.md#dcl.enum
162
- [dcl.ref]: dcl.md#dcl.ref
163
- [declval]: #declval
164
- [default.allocator]: #default.allocator
165
- [defaultconstructible]: #defaultconstructible
166
- [destructible]: #destructible
167
- [equalitycomparable]: #equalitycomparable
168
- [expr]: expr.md#expr
169
- [expr.add]: expr.md#expr.add
170
- [expr.alignof]: expr.md#expr.alignof
171
- [expr.bit.and]: expr.md#expr.bit.and
172
- [expr.call]: expr.md#expr.call
173
- [expr.eq]: expr.md#expr.eq
174
- [expr.log.and]: expr.md#expr.log.and
175
- [expr.log.or]: expr.md#expr.log.or
176
- [expr.mul]: expr.md#expr.mul
177
- [expr.or]: expr.md#expr.or
178
- [expr.rel]: expr.md#expr.rel
179
- [expr.unary.noexcept]: expr.md#expr.unary.noexcept
180
- [expr.unary.op]: expr.md#expr.unary.op
181
- [expr.xor]: expr.md#expr.xor
182
- [forward]: #forward
183
- [forward.iterators]: iterators.md#forward.iterators
184
- [func.bind]: #func.bind
185
- [func.bind.bind]: #func.bind.bind
186
- [func.bind.isbind]: #func.bind.isbind
187
- [func.bind.isplace]: #func.bind.isplace
188
- [func.bind.place]: #func.bind.place
189
- [func.def]: #func.def
190
- [func.memfn]: #func.memfn
191
- [func.require]: #func.require
192
- [func.wrap]: #func.wrap
193
- [func.wrap.badcall]: #func.wrap.badcall
194
- [func.wrap.badcall.const]: #func.wrap.badcall.const
195
- [func.wrap.func]: #func.wrap.func
196
- [func.wrap.func.alg]: #func.wrap.func.alg
197
- [func.wrap.func.cap]: #func.wrap.func.cap
198
- [func.wrap.func.con]: #func.wrap.func.con
199
- [func.wrap.func.inv]: #func.wrap.func.inv
200
- [func.wrap.func.mod]: #func.wrap.func.mod
201
- [func.wrap.func.nullptr]: #func.wrap.func.nullptr
202
- [func.wrap.func.targ]: #func.wrap.func.targ
203
- [function.objects]: #function.objects
204
- [hash.requirements]: library.md#hash.requirements
205
- [input.iterators]: iterators.md#input.iterators
206
- [intro.multithread]: intro.md#intro.multithread
207
- [intseq]: #intseq
208
- [intseq.general]: #intseq.general
209
- [intseq.intseq]: #intseq.intseq
210
- [intseq.make]: #intseq.make
211
- [invalid.argument]: diagnostics.md#invalid.argument
212
- [iostate.flags]: input.md#iostate.flags
213
- [istream.formatted]: input.md#istream.formatted
214
- [lessthancomparable]: #lessthancomparable
215
- [logical.operations]: #logical.operations
216
- [memory]: #memory
217
- [memory.general]: #memory.general
218
- [memory.syn]: #memory.syn
219
- [meta]: #meta
220
- [meta.help]: #meta.help
221
- [meta.rel]: #meta.rel
222
- [meta.rqmts]: #meta.rqmts
223
- [meta.trans]: #meta.trans
224
- [meta.trans.arr]: #meta.trans.arr
225
- [meta.trans.cv]: #meta.trans.cv
226
- [meta.trans.other]: #meta.trans.other
227
- [meta.trans.ptr]: #meta.trans.ptr
228
- [meta.trans.ref]: #meta.trans.ref
229
- [meta.trans.sign]: #meta.trans.sign
230
- [meta.type.synop]: #meta.type.synop
231
- [meta.unary]: #meta.unary
232
- [meta.unary.cat]: #meta.unary.cat
233
- [meta.unary.comp]: #meta.unary.comp
234
- [meta.unary.prop]: #meta.unary.prop
235
- [meta.unary.prop.query]: #meta.unary.prop.query
236
- [moveassignable]: #moveassignable
237
- [moveconstructible]: #moveconstructible
238
- [negators]: #negators
239
- [new.delete]: language.md#new.delete
240
- [nullablepointer.requirements]: library.md#nullablepointer.requirements
241
- [numeric.requirements]: numerics.md#numeric.requirements
242
- [operators]: #operators
243
- [ostream.formatted]: input.md#ostream.formatted
244
- [out.of.range]: diagnostics.md#out.of.range
245
- [output.iterators]: iterators.md#output.iterators
246
- [over.match.call]: over.md#over.match.call
247
- [overflow.error]: diagnostics.md#overflow.error
248
- [pair.astuple]: #pair.astuple
249
- [pair.piecewise]: #pair.piecewise
250
- [pairs]: #pairs
251
- [pairs.general]: #pairs.general
252
- [pairs.pair]: #pairs.pair
253
- [pairs.spec]: #pairs.spec
254
- [pointer.traits]: #pointer.traits
255
- [pointer.traits.functions]: #pointer.traits.functions
256
- [pointer.traits.types]: #pointer.traits.types
257
- [ptr.align]: #ptr.align
258
- [ratio]: #ratio
259
- [ratio.arithmetic]: #ratio.arithmetic
260
- [ratio.comparison]: #ratio.comparison
261
- [ratio.general]: #ratio.general
262
- [ratio.ratio]: #ratio.ratio
263
- [ratio.si]: #ratio.si
264
- [ratio.syn]: #ratio.syn
265
- [refwrap]: #refwrap
266
- [refwrap.access]: #refwrap.access
267
- [refwrap.assign]: #refwrap.assign
268
- [refwrap.const]: #refwrap.const
269
- [refwrap.helpers]: #refwrap.helpers
270
- [refwrap.invoke]: #refwrap.invoke
271
- [res.on.data.races]: library.md#res.on.data.races
272
- [scoped.adaptor.operators]: #scoped.adaptor.operators
273
- [smartptr]: #smartptr
274
- [special]: special.md#special
275
- [specialized.addressof]: #specialized.addressof
276
- [specialized.algorithms]: #specialized.algorithms
277
- [stmt.dcl]: stmt.md#stmt.dcl
278
- [storage.iterator]: #storage.iterator
279
- [support.dynamic]: language.md#support.dynamic
280
- [swappable.requirements]: library.md#swappable.requirements
281
- [tab:ratio.arithmetic]: #tab:ratio.arithmetic
282
- [tab:time.clock]: #tab:time.clock
283
- [tab:util.hdr.cstdlib]: #tab:util.hdr.cstdlib
284
- [tab:util.hdr.cstring]: #tab:util.hdr.cstring
285
- [tab:util.hdr.ctime]: #tab:util.hdr.ctime
286
- [tab:util.lib.summary]: #tab:util.lib.summary
287
- [template.bitset]: #template.bitset
288
- [temporary.buffer]: #temporary.buffer
289
- [time]: #time
290
- [time.clock]: #time.clock
291
- [time.clock.hires]: #time.clock.hires
292
- [time.clock.req]: #time.clock.req
293
- [time.clock.steady]: #time.clock.steady
294
- [time.clock.system]: #time.clock.system
295
- [time.duration]: #time.duration
296
- [time.duration.arithmetic]: #time.duration.arithmetic
297
- [time.duration.cast]: #time.duration.cast
298
- [time.duration.comparisons]: #time.duration.comparisons
299
- [time.duration.cons]: #time.duration.cons
300
- [time.duration.literals]: #time.duration.literals
301
- [time.duration.nonmember]: #time.duration.nonmember
302
- [time.duration.observer]: #time.duration.observer
303
- [time.duration.special]: #time.duration.special
304
- [time.general]: #time.general
305
- [time.point]: #time.point
306
- [time.point.arithmetic]: #time.point.arithmetic
307
- [time.point.cast]: #time.point.cast
308
- [time.point.comparisons]: #time.point.comparisons
309
- [time.point.cons]: #time.point.cons
310
- [time.point.nonmember]: #time.point.nonmember
311
- [time.point.observer]: #time.point.observer
312
- [time.point.special]: #time.point.special
313
- [time.syn]: #time.syn
314
- [time.traits]: #time.traits
315
- [time.traits.duration_values]: #time.traits.duration_values
316
- [time.traits.is_fp]: #time.traits.is_fp
317
- [time.traits.specializations]: #time.traits.specializations
318
- [tuple]: #tuple
319
- [tuple.assign]: #tuple.assign
320
- [tuple.cnstr]: #tuple.cnstr
321
- [tuple.creation]: #tuple.creation
322
- [tuple.elem]: #tuple.elem
323
- [tuple.general]: #tuple.general
324
- [tuple.helper]: #tuple.helper
325
- [tuple.rel]: #tuple.rel
326
- [tuple.special]: #tuple.special
327
- [tuple.swap]: #tuple.swap
328
- [tuple.traits]: #tuple.traits
329
- [tuple.tuple]: #tuple.tuple
330
- [type.index]: #type.index
331
- [type.index.hash]: #type.index.hash
332
- [type.index.members]: #type.index.members
333
- [type.index.overview]: #type.index.overview
334
- [type.index.synopsis]: #type.index.synopsis
335
- [uninitialized.copy]: #uninitialized.copy
336
- [uninitialized.fill]: #uninitialized.fill
337
- [uninitialized.fill.n]: #uninitialized.fill.n
338
- [unique.ptr]: #unique.ptr
339
- [unique.ptr.create]: #unique.ptr.create
340
- [unique.ptr.dltr]: #unique.ptr.dltr
341
- [unique.ptr.dltr.dflt]: #unique.ptr.dltr.dflt
342
- [unique.ptr.dltr.dflt1]: #unique.ptr.dltr.dflt1
343
- [unique.ptr.dltr.general]: #unique.ptr.dltr.general
344
- [unique.ptr.runtime]: #unique.ptr.runtime
345
- [unique.ptr.runtime.ctor]: #unique.ptr.runtime.ctor
346
- [unique.ptr.runtime.modifiers]: #unique.ptr.runtime.modifiers
347
- [unique.ptr.runtime.observers]: #unique.ptr.runtime.observers
348
- [unique.ptr.single]: #unique.ptr.single
349
- [unique.ptr.single.asgn]: #unique.ptr.single.asgn
350
- [unique.ptr.single.ctor]: #unique.ptr.single.ctor
351
- [unique.ptr.single.dtor]: #unique.ptr.single.dtor
352
- [unique.ptr.single.modifiers]: #unique.ptr.single.modifiers
353
- [unique.ptr.single.observers]: #unique.ptr.single.observers
354
- [unique.ptr.special]: #unique.ptr.special
355
- [unord]: containers.md#unord
356
- [unord.hash]: #unord.hash
357
- [util.dynamic.safety]: #util.dynamic.safety
358
- [util.smartptr]: #util.smartptr
359
- [util.smartptr.enab]: #util.smartptr.enab
360
- [util.smartptr.getdeleter]: #util.smartptr.getdeleter
361
- [util.smartptr.hash]: #util.smartptr.hash
362
- [util.smartptr.ownerless]: #util.smartptr.ownerless
363
- [util.smartptr.shared]: #util.smartptr.shared
364
- [util.smartptr.shared.assign]: #util.smartptr.shared.assign
365
- [util.smartptr.shared.atomic]: #util.smartptr.shared.atomic
366
- [util.smartptr.shared.cast]: #util.smartptr.shared.cast
367
- [util.smartptr.shared.cmp]: #util.smartptr.shared.cmp
368
- [util.smartptr.shared.const]: #util.smartptr.shared.const
369
- [util.smartptr.shared.create]: #util.smartptr.shared.create
370
- [util.smartptr.shared.dest]: #util.smartptr.shared.dest
371
- [util.smartptr.shared.io]: #util.smartptr.shared.io
372
- [util.smartptr.shared.mod]: #util.smartptr.shared.mod
373
- [util.smartptr.shared.obs]: #util.smartptr.shared.obs
374
- [util.smartptr.shared.spec]: #util.smartptr.shared.spec
375
- [util.smartptr.weak]: #util.smartptr.weak
376
- [util.smartptr.weak.assign]: #util.smartptr.weak.assign
377
- [util.smartptr.weak.const]: #util.smartptr.weak.const
378
- [util.smartptr.weak.dest]: #util.smartptr.weak.dest
379
- [util.smartptr.weak.mod]: #util.smartptr.weak.mod
380
- [util.smartptr.weak.obs]: #util.smartptr.weak.obs
381
- [util.smartptr.weak.spec]: #util.smartptr.weak.spec
382
- [util.smartptr.weakptr]: #util.smartptr.weakptr
383
- [utilities]: #utilities
384
- [utilities.general]: #utilities.general
385
- [utility]: #utility
386
- [utility.exchange]: #utility.exchange
387
- [utility.swap]: #utility.swap
388
-
389
- [^1]: `pointer_safety::preferred` might be returned to indicate that a
390
- leak detector is running so that the program can avoid spurious leak
391
- reports.
392
-
393
- [^2]: Such a type is a function pointer or a class type which has a
394
- member `operator()` or a class type which has a conversion to a
395
- pointer to function.
396
-
397
- [^3]: `strftime` supports the C conversion specifiers `C`, `D`, `e`,
398
- `F`, `g`, `G`, `h`, `r`, `R`, `t`, `T`, `u`, `V`, and `z`, and the
399
- modifiers `E` and `O`.
 
42
 
43
  ``` cpp
44
  type_index(const type_info& rhs) noexcept;
45
  ```
46
 
47
+ *Effects:* Constructs a `type_index` object, the equivalent of
48
  `target = &rhs`.
49
 
50
  ``` cpp
51
  bool operator==(const type_index& rhs) const noexcept;
52
  ```
53
 
54
+ *Returns:* `*target == *rhs.target`.
55
 
56
  ``` cpp
57
  bool operator!=(const type_index& rhs) const noexcept;
58
  ```
59
 
60
+ *Returns:* `*target != *rhs.target`.
61
 
62
  ``` cpp
63
  bool operator<(const type_index& rhs) const noexcept;
64
  ```
65
 
66
+ *Returns:* `target->before(*rhs.target)`.
67
 
68
  ``` cpp
69
  bool operator<=(const type_index& rhs) const noexcept;
70
  ```
71
 
72
+ *Returns:* `!rhs.target->before(*target)`.
73
 
74
  ``` cpp
75
  bool operator>(const type_index& rhs) const noexcept;
76
  ```
77
 
78
+ *Returns:* `rhs.target->before(*target)`.
79
 
80
  ``` cpp
81
  bool operator>=(const type_index& rhs) const noexcept;
82
  ```
83
 
84
+ *Returns:* `!target->before(*rhs.target)`.
85
 
86
  ``` cpp
87
  size_t hash_code() const noexcept;
88
  ```
89
 
90
+ *Returns:* `target->hash_code()`.
91
 
92
  ``` cpp
93
  const char* name() const noexcept;
94
  ```
95
 
96
+ *Returns:* `target->name()`.
97
 
98
  ### Hash support <a id="type.index.hash">[[type.index.hash]]</a>
99
 
100
  ``` cpp
101
  template <> struct hash<type_index>;
102
  ```
103
 
104
+ For an object `index` of type `type_index`, `hash<type_index>()(index)`
105
+ shall evaluate to the same result as `index.hash_code()`.
 
 
106