|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Observers | ||||
| Modifiers | ||||
| Non-member functions | ||||
operator==operator<=> | ||||
| Deduction guides | ||||
| Helper classes | ||||
Defined in header <memory> | ||
Compare two indirect objects | ||
template<class U,class A> constexprbool operator==(const indirect& lhs,const indirect<U, A>& rhs) | (1) | (since C++26) |
template<class U,class A> constexpr/*synth-three-way-result*/<T, U> | (2) | (since C++26) |
Compare an indirect object with a value | ||
template<class U> constexprbool operator==(const indirect& ind,const U& value) | (3) | (since C++26) |
template<class U> constexpr/*synth-three-way-result*/<T, U> | (4) | (since C++26) |
Performs comparison operations onindirect objects.
For the definition of/*synth-three-way-result*/, seesynth-three-way-result .
indirect objects, the comparison result is defined as follows:| lhs | valueless | not valueless | ||
|---|---|---|---|---|
| rhs | valueless | not valueless | valueless | not valueless |
| operator== | true | false | false | *lhs==*rhs |
| operator<=> | !lhs.valueless_after_move()<=> !rhs.valueless_after_move() | synth-three-way (*lhs,*rhs) | ||
indirect object with a value, the comparison result is defined as follows:| Operator | ind is valueless | ind is not valueless |
|---|---|---|
| operator== | false | *ind== value |
| operator<=> | std::strong_ordering::less | synth-three-way (*ind, value) |
| lhs, rhs, ind | - | anindirect object to compare |
| value | - | value to compare to the owned value |
As described above.
| This section is incomplete Reason: no example |