[refwrap.comparisons] # 22 General utilities library [[utilities]](./#utilities) ## 22.10 Function objects [[function.objects]](function.objects#refwrap.comparisons) ### 22.10.6 Class template reference_wrapper [[refwrap]](refwrap#comparisons) #### 22.10.6.6 Comparisons [refwrap.comparisons] [🔗](#itemdecl:1) `friend constexpr bool operator==(reference_wrapper x, reference_wrapper y); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11824) *Constraints*: The expression x.get() == y.get() is well-formed and its result is convertible to bool[.](#1.sentence-1) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11829) *Returns*: x.get() == y.get()[.](#2.sentence-1) [🔗](#itemdecl:2) `friend constexpr bool operator==(reference_wrapper x, const T& y); ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11839) *Constraints*: The expression x.get() == y is well-formed and its result is convertible to bool[.](#3.sentence-1) [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11844) *Returns*: x.get() == y[.](#4.sentence-1) [🔗](#itemdecl:3) `friend constexpr bool operator==(reference_wrapper x, reference_wrapper y); ` [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11854) *Constraints*: is_const_v is false and the expression x.get() == y.get() is well-formed and its result is convertible to bool[.](#5.sentence-1) [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11860) *Returns*: x.get() == y.get()[.](#6.sentence-1) [🔗](#itemdecl:4) `friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y); ` [7](#7) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11870) *Constraints*: The expression *synth-three-way*(x.get(), y.get()) is well-formed[.](#7.sentence-1) [8](#8) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11875) *Returns*: *synth-three-way*(x.get(), y.get())[.](#8.sentence-1) [🔗](#itemdecl:5) `friend constexpr auto operator<=>(reference_wrapper x, const T& y); ` [9](#9) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11885) *Constraints*: The expression *synth-three-way*(x.get(), y) is well-formed[.](#9.sentence-1) [10](#10) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11890) *Returns*: *synth-three-way*(x.get(), y)[.](#10.sentence-1) [🔗](#itemdecl:6) `friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y); ` [11](#11) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11900) *Constraints*: is_const_v is false[.](#11.sentence-1) The expression *synth-three-way*(x.get(), y.get()) is well-formed[.](#11.sentence-2) [12](#12) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L11906) *Returns*: *synth-three-way*(x.get(), y.get())[.](#12.sentence-1)