mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 15:15:39 +08:00
Narrow the explicit iterator category of our iterator adaptors to reflect their implicit category.
This commit is contained in:
@@ -148,7 +148,7 @@ namespace BlackMisc
|
|||||||
* By creating a CRange from such iterators, it is possible to perform a transformation on a container without copying elements.
|
* By creating a CRange from such iterators, it is possible to perform a transformation on a container without copying elements.
|
||||||
*/
|
*/
|
||||||
template <class I, class F> class TransformIterator
|
template <class I, class F> class TransformIterator
|
||||||
: public std::iterator<std::input_iterator_tag,
|
: public std::iterator<std::forward_iterator_tag,
|
||||||
std::decay_t<decltype(std::declval<F>()(std::declval<typename std::iterator_traits<I>::value_type>()))>>
|
std::decay_t<decltype(std::declval<F>()(std::declval<typename std::iterator_traits<I>::value_type>()))>>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -213,7 +213,7 @@ namespace BlackMisc
|
|||||||
*
|
*
|
||||||
* By creating a CRange from such iterators, it is possible to return the results of predicate methods without copying elements.
|
* By creating a CRange from such iterators, it is possible to return the results of predicate methods without copying elements.
|
||||||
*/
|
*/
|
||||||
template <class I, class F> class ConditionalIterator : public std::iterator<std::input_iterator_tag, typename std::iterator_traits<I>::value_type>
|
template <class I, class F> class ConditionalIterator : public std::iterator<std::forward_iterator_tag, typename std::iterator_traits<I>::value_type>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor.
|
//! Constructor.
|
||||||
@@ -277,7 +277,7 @@ namespace BlackMisc
|
|||||||
/*!
|
/*!
|
||||||
* Iterator wrapper which concatenates zero or more pairs of begin and end iterators.
|
* Iterator wrapper which concatenates zero or more pairs of begin and end iterators.
|
||||||
*/
|
*/
|
||||||
template <class I> class ConcatIterator : public std::iterator<std::input_iterator_tag, typename std::iterator_traits<I>::value_type>
|
template <class I> class ConcatIterator : public std::iterator<std::forward_iterator_tag, typename std::iterator_traits<I>::value_type>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor.
|
//! Constructor.
|
||||||
|
|||||||
Reference in New Issue
Block a user