mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 23:24:01 +00:00
Merge pull request #43 from hp-peti/pull_coroutine_std_begin_end_patch
Fix ambiguity of std::begin/end
This commit is contained in:
commit
bf12f185c8
@ -130,6 +130,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
friend class iterator;
|
friend class iterator;
|
||||||
|
|
||||||
|
iterator begin() { return iterator (this); }
|
||||||
|
iterator end() { return iterator(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
@ -238,6 +241,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
friend class iterator;
|
friend class iterator;
|
||||||
|
|
||||||
|
iterator begin() { return iterator (this); }
|
||||||
|
iterator end() { return iterator(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@ -278,6 +284,8 @@ public:
|
|||||||
explicit operator bool() const noexcept;
|
explicit operator bool() const noexcept;
|
||||||
|
|
||||||
bool operator!() const noexcept;
|
bool operator!() const noexcept;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
@ -294,22 +302,6 @@ end( pull_coroutine< T > &) {
|
|||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
namespace std {
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
typename boost::coroutines2::detail::pull_coroutine< T >::iterator
|
|
||||||
begin( boost::coroutines2::detail::pull_coroutine< T > & c) {
|
|
||||||
return boost::coroutines2::detail::begin( c);
|
|
||||||
}
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
typename boost::coroutines2::detail::pull_coroutine< T >::iterator
|
|
||||||
end( boost::coroutines2::detail::pull_coroutine< T > & c) {
|
|
||||||
return boost::coroutines2::detail::end( c);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef BOOST_HAS_ABI_HEADERS
|
#ifdef BOOST_HAS_ABI_HEADERS
|
||||||
# include BOOST_ABI_SUFFIX
|
# include BOOST_ABI_SUFFIX
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user