Commit d1aa7705 by Jonathan Wakely

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<true>): Remove
	redundant _GLIBCXX20_CONSTEXPR.
parent ff861d65
2020-02-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
redundant _GLIBCXX20_CONSTEXPR.
2020-02-05 Jonathan Wakely <jwakely@redhat.com> 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/iterator_concepts.h (iter_reference_t) * include/bits/iterator_concepts.h (iter_reference_t)
......
...@@ -139,7 +139,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -139,7 +139,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __iter_swap struct __iter_swap
{ {
template<typename _ForwardIterator1, typename _ForwardIterator2> template<typename _ForwardIterator1, typename _ForwardIterator2>
_GLIBCXX20_CONSTEXPR
static void static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{ {
...@@ -155,14 +154,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -155,14 +154,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __iter_swap<true> struct __iter_swap<true>
{ {
template<typename _ForwardIterator1, typename _ForwardIterator2> template<typename _ForwardIterator1, typename _ForwardIterator2>
_GLIBCXX20_CONSTEXPR
static void static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{ {
swap(*__a, *__b); swap(*__a, *__b);
} }
}; };
#endif #endif // C++03
/** /**
* @brief Swaps the contents of two iterators. * @brief Swaps the contents of two iterators.
...@@ -205,6 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -205,6 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
&& __are_same<_ValueType2&, _ReferenceType2>::__value>:: && __are_same<_ValueType2&, _ReferenceType2>::__value>::
iter_swap(__a, __b); iter_swap(__a, __b);
#else #else
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 187. iter_swap underspecified
swap(*__a, *__b); swap(*__a, *__b);
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment