From: Jonathan Wakely Date: Thu, 6 Feb 2020 10:45:38 +0000 (+0000) Subject: libstdc++: Remove redundant macro that is always empty X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1aa7705d59e56191c2ccc5594983d8fa0832718;p=gcc.git libstdc++: Remove redundant macro that is always empty The __iter_swap class template and explicit specialization are only declared (and used) for C++03 so _GLIBCXX20_CONSTEXPR does nothing here. * include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove redundant _GLIBCXX20_CONSTEXPR. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 76a6e2b542d..50c4dd9b84c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2020-02-06 Jonathan Wakely + + * include/bits/stl_algobase.h (__iter_swap, __iter_swap): Remove + redundant _GLIBCXX20_CONSTEXPR. + 2020-02-05 Jonathan Wakely * include/bits/iterator_concepts.h (iter_reference_t) diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index dc922a0f3d2..efda15f816e 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -139,7 +139,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __iter_swap { template - _GLIBCXX20_CONSTEXPR static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { @@ -155,14 +154,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __iter_swap { template - _GLIBCXX20_CONSTEXPR static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; -#endif +#endif // C++03 /** * @brief Swaps the contents of two iterators. @@ -205,6 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); #else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 187. iter_swap underspecified swap(*__a, *__b); #endif }