30 lines
882 B
Markdown
30 lines
882 B
Markdown
[concepts.compare.general]
|
||
|
||
# 18 Concepts library [[concepts]](./#concepts)
|
||
|
||
## 18.5 Comparison concepts [[concepts.compare]](concepts.compare#general)
|
||
|
||
### 18.5.1 General [concepts.compare.general]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L843)
|
||
|
||
Subclause [[concepts.compare]](concepts.compare "18.5 Comparison concepts") describes concepts that establish relationships and orderings
|
||
on values of possibly differing object types[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L847)
|
||
|
||
Given an expression E and a type C,
|
||
let *CONVERT_TO_LVALUE*<C>(E) be:
|
||
|
||
- [(2.1)](#2.1)
|
||
|
||
static_cast<const C&>(as_const(E)) if that is a valid expression, and
|
||
|
||
- [(2.2)](#2.2)
|
||
|
||
static_cast<const C&>(std::move(E)) otherwise[.](#2.sentence-1)
|