https://gcc.gnu.org/g:9d2a7a749e5d418f11c504c3081ce383444af84e
commit r13-9473-g9d2a7a749e5d418f11c504c3081ce383444af84e Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Sep 18 16:17:28 2024 +0100 libstdc++: Use constexpr instead of _GLIBCXX20_CONSTEXPR in <vector> For the operator<=> overload we can use the 'constexpr' keyword directly, because we know the language dialect is at least C++20. libstdc++-v3/ChangeLog: * include/bits/stl_vector.h (operator<=>): Use constexpr instead of _GLIBCXX20_CONSTEXPR macro. (cherry picked from commit b6463161c3cd0b1f764697290d9569c7153b8a5b) Diff: --- libstdc++-v3/include/bits/stl_vector.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 798e66d91ac8..ac63b218fa9b 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -2041,7 +2041,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); } -#if __cpp_lib_three_way_comparison +#if __cpp_lib_three_way_comparison // >= C++20 /** * @brief Vector ordering relation. * @param __x A `vector`. @@ -2054,8 +2054,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * `<` and `>=` etc. */ template<typename _Tp, typename _Alloc> - _GLIBCXX20_CONSTEXPR - inline __detail::__synth3way_t<_Tp> + constexpr __detail::__synth3way_t<_Tp> operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return std::lexicographical_compare_three_way(__x.begin(), __x.end(),