Init
This commit is contained in:
37
cppdraft/comparisons/general.md
Normal file
37
cppdraft/comparisons/general.md
Normal file
@@ -0,0 +1,37 @@
|
||||
[comparisons.general]
|
||||
|
||||
# 22 General utilities library [[utilities]](./#utilities)
|
||||
|
||||
## 22.10 Function objects [[function.objects]](function.objects#comparisons.general)
|
||||
|
||||
### 22.10.8 Comparisons [[comparisons]](comparisons#general)
|
||||
|
||||
#### 22.10.8.1 General [comparisons.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12260)
|
||||
|
||||
The library provides basic function object classes for all of the comparison
|
||||
operators in the language ([[expr.rel]](expr.rel "7.6.9 Relational operators"), [[expr.eq]](expr.eq "7.6.10 Equality operators"))[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12264)
|
||||
|
||||
For templates less, greater, less_equal, andgreater_equal, the specializations for any pointer type
|
||||
yield a result consistent with the
|
||||
implementation-defined strict total order over pointers ([[defns.order.ptr]](defns.order.ptr "3.28 implementation-defined strict total order over pointers"))[.](#2.sentence-1)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
If a < b is well-defined
|
||||
for pointers a and b of type P,
|
||||
then (a < b) == less<P>()(a, b),(a > b) == greater<P>()(a, b), and so forth[.](#2.sentence-2)
|
||||
|
||||
â *end note*]
|
||||
|
||||
For template specializations less<void>, greater<void>,less_equal<void>, and greater_equal<void>,
|
||||
if the call operator calls a built-in operator comparing pointers,
|
||||
the call operator yields a result consistent
|
||||
with the implementation-defined strict total order over pointers[.](#2.sentence-3)
|
||||
Reference in New Issue
Block a user