Files
cppdraft_translate/cppdraft/refwrap/comparisons.md
2025-10-25 03:02:53 +03:00

3.3 KiB

[refwrap.comparisons]

22 General utilities library [utilities]

22.10 Function objects [function.objects]

22.10.6 Class template reference_wrapper [refwrap]

22.10.6.6 Comparisons [refwrap.comparisons]

🔗

friend constexpr bool operator==(reference_wrapper x, reference_wrapper y);

1

#

Constraints: The expression x.get() == y.get() is well-formed and its result is convertible to bool.

2

#

Returns: x.get() == y.get().

🔗

friend constexpr bool operator==(reference_wrapper x, const T& y);

3

#

Constraints: The expression x.get() == y is well-formed and its result is convertible to bool.

4

#

Returns: x.get() == y.

🔗

friend constexpr bool operator==(reference_wrapper x, reference_wrapper<const T> y);

5

#

Constraints: is_const_v is false and the expression x.get() == y.get() is well-formed and its result is convertible to bool.

6

#

Returns: x.get() == y.get().

🔗

friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y);

7

#

Constraints: The expression synth-three-way(x.get(), y.get()) is well-formed.

8

#

Returns: synth-three-way(x.get(), y.get()).

🔗

friend constexpr auto operator<=>(reference_wrapper x, const T& y);

9

#

Constraints: The expression synth-three-way(x.get(), y) is well-formed.

10

#

Returns: synth-three-way(x.get(), y).

🔗

friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper<const T> y);

11

#

Constraints: is_const_v is false.

The expression synth-three-way(x.get(), y.get()) is well-formed.

12

#

Returns: synth-three-way(x.get(), y.get()).