Skip to content

Commit c7ee7c6

Browse files
committed
Fix to 2013-09 LWG Motion 7:
[comparisons] Fix incorrect application of N3789 to the working paper: - Add 'constexpr' to std::equal_to<>::operator() std::not_equal_to<>::operator() std::greater<>::operator() std::less<>::operator() std::greater_equal<>::operator() std::less_equal<>::operator() - Reorder 'bool constexpr' to 'constexpr bool' in std::logical_or<T>::operator() std::logical_and<T>::operator() std::logical_not<T>::operator() Also fixes 14882:2014 DIS JP 08, fixes 14882:2014 DIS JP 09, fixes #291.
1 parent d833639 commit c7ee7c6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/utilities.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7811,7 +7811,7 @@
78117811
\indexlibrary{\idxcode{equal_to<>}}%
78127812
\begin{itemdecl}
78137813
template <> struct equal_to<void> {
7814-
template <class T, class U> auto operator()(T&& t, U&& u) const
7814+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78157815
-> decltype(std::forward<T>(t) == std::forward<U>(u));
78167816

78177817
typedef @\unspec@ is_transparent;
@@ -7826,7 +7826,7 @@
78267826
\indexlibrary{\idxcode{not_equal_to<>}}%
78277827
\begin{itemdecl}
78287828
template <> struct not_equal_to<void> {
7829-
template <class T, class U> auto operator()(T&& t, U&& u) const
7829+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78307830
-> decltype(std::forward<T>(t) != std::forward<U>(u));
78317831

78327832
typedef @\unspec@ is_transparent;
@@ -7841,7 +7841,7 @@
78417841
\indexlibrary{\idxcode{greater<>}}%
78427842
\begin{itemdecl}
78437843
template <> struct greater<void> {
7844-
template <class T, class U> auto operator()(T&& t, U&& u) const
7844+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78457845
-> decltype(std::forward<T>(t) > std::forward<U>(u));
78467846

78477847
typedef @\unspec@ is_transparent;
@@ -7856,7 +7856,7 @@
78567856
\indexlibrary{\idxcode{less<>}}%
78577857
\begin{itemdecl}
78587858
template <> struct less<void> {
7859-
template <class T, class U> auto operator()(T&& t, U&& u) const
7859+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78607860
-> decltype(std::forward<T>(t) < std::forward<U>(u));
78617861

78627862
typedef @\unspec@ is_transparent;
@@ -7871,7 +7871,7 @@
78717871
\indexlibrary{\idxcode{greater_equal<>}}%
78727872
\begin{itemdecl}
78737873
template <> struct greater_equal<void> {
7874-
template <class T, class U> auto operator()(T&& t, U&& u) const
7874+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78757875
-> decltype(std::forward<T>(t) >= std::forward<U>(u));
78767876

78777877
typedef @\unspec@ is_transparent;
@@ -7886,7 +7886,7 @@
78867886
\indexlibrary{\idxcode{less_equal<>}}%
78877887
\begin{itemdecl}
78887888
template <> struct less_equal<void> {
7889-
template <class T, class U> auto operator()(T&& t, U&& u) const
7889+
template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
78907890
-> decltype(std::forward<T>(t) <= std::forward<U>(u));
78917891

78927892
typedef @\unspec@ is_transparent;
@@ -7913,7 +7913,7 @@
79137913
\indexlibrary{\idxcode{logical_and}}%
79147914
\begin{itemdecl}
79157915
template <class T = void> struct logical_and {
7916-
bool constexpr operator()(const T& x, const T& y) const;
7916+
constexpr bool operator()(const T& x, const T& y) const;
79177917
typedef T first_argument_type;
79187918
typedef T second_argument_type;
79197919
typedef bool result_type;
@@ -7928,7 +7928,7 @@
79287928
\indexlibrary{\idxcode{logical_or}}%
79297929
\begin{itemdecl}
79307930
template <class T = void> struct logical_or {
7931-
bool constexpr operator()(const T& x, const T& y) const;
7931+
constexpr bool operator()(const T& x, const T& y) const;
79327932
typedef T first_argument_type;
79337933
typedef T second_argument_type;
79347934
typedef bool result_type;
@@ -7943,7 +7943,7 @@
79437943
\indexlibrary{\idxcode{logical_not}}%
79447944
\begin{itemdecl}
79457945
template <class T = void> struct logical_not {
7946-
bool constexpr operator()(const T& x) const;
7946+
constexpr bool operator()(const T& x) const;
79477947
typedef T argument_type;
79487948
typedef bool result_type;
79497949
};

0 commit comments

Comments
 (0)