Skip to content

Commit 192bbc6

Browse files
committed
🛠 Adjust to accommodate GCC failure with friendship
1 parent af2914a commit 192bbc6

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎include/ztd/ranges/counted_iterator.hpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ namespace ztd { namespace ranges {
6666
using _ItDiff = ranges::iterator_difference_type_t<_It>;
6767

6868
static constexpr bool _S_operator_plusplus_noexcept() noexcept {
69-
return noexcept(++::std::declval<_It&>())&& noexcept(--::std::declval<_ItDiff&>());
69+
return noexcept(++::std::declval<_It&>()) && noexcept(--::std::declval<_ItDiff&>());
7070
}
7171

7272
static constexpr bool _S_operator_minusminus_noexcept() noexcept {
73-
return noexcept(--::std::declval<_It&>())&& noexcept(++::std::declval<_ItDiff&>());
73+
return noexcept(--::std::declval<_It&>()) && noexcept(++::std::declval<_ItDiff&>());
7474
}
7575

7676
public:
@@ -251,15 +251,15 @@ namespace ztd { namespace ranges {
251251
}
252252

253253
friend constexpr ranges::iterator_rvalue_reference_t<_It> iter_move(
254-
const __counted_iterator& __it) noexcept(noexcept(::ztd::ranges::iter_move(__it._M_it))) {
255-
return ::ztd::ranges::iter_move(__it._M_it);
254+
const __counted_iterator& __it) noexcept(noexcept(::ztd::ranges::iter_move(__it.base()))) {
255+
return ::ztd::ranges::iter_move(__it.base());
256256
}
257257

258258
template <typename _RightIt>
259259
friend constexpr void
260-
iter_swap(const __counted_iterator& x, const __counted_iterator<_RightIt>& y) noexcept(
261-
noexcept(::ztd::ranges::iter_swap(x._M_it, y._M_it))) {
262-
::ztd::ranges::iter_swap(x._M_it, y._M_it);
260+
iter_swap(const __counted_iterator& __left, const __counted_iterator<_RightIt>& __right) noexcept(
261+
noexcept(::ztd::ranges::iter_swap(__left.base(), __right.base()))) {
262+
::ztd::ranges::iter_swap(__left.base(), __right.base());
263263
}
264264

265265
private:

0 commit comments

Comments
 (0)