mirror of
https://github.com/boostorg/iterator.git
synced 2025-08-01 05:44:32 +02:00
Moved input_output_iterator_tag to unit tests.
The class was not used anywhere else and was an implementation detail.
This commit is contained in:
@@ -22,21 +22,6 @@ namespace boost {
|
|||||||
namespace iterators {
|
namespace iterators {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
struct input_output_iterator_tag :
|
|
||||||
public std::input_iterator_tag
|
|
||||||
{
|
|
||||||
// Using inheritance for only input_iterator_tag helps to avoid
|
|
||||||
// ambiguities when a stdlib implementation dispatches on a
|
|
||||||
// function which is overloaded on both input_iterator_tag and
|
|
||||||
// output_iterator_tag, as STLPort does, in its __valid_range
|
|
||||||
// function. I claim it's better to avoid the ambiguity in these
|
|
||||||
// cases.
|
|
||||||
operator std::output_iterator_tag() const
|
|
||||||
{
|
|
||||||
return std::output_iterator_tag();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
|
@@ -6,9 +6,25 @@
|
|||||||
|
|
||||||
#include "static_assert_same.hpp"
|
#include "static_assert_same.hpp"
|
||||||
|
|
||||||
|
#include <iterator>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <boost/iterator/minimum_category.hpp>
|
#include <boost/iterator/minimum_category.hpp>
|
||||||
|
|
||||||
|
struct input_output_iterator_tag :
|
||||||
|
public std::input_iterator_tag
|
||||||
|
{
|
||||||
|
// Using inheritance for only input_iterator_tag helps to avoid
|
||||||
|
// ambiguities when a stdlib implementation dispatches on a
|
||||||
|
// function which is overloaded on both input_iterator_tag and
|
||||||
|
// output_iterator_tag, as STLPort does, in its __valid_range
|
||||||
|
// function. I claim it's better to avoid the ambiguity in these
|
||||||
|
// cases.
|
||||||
|
operator std::output_iterator_tag() const
|
||||||
|
{
|
||||||
|
return std::output_iterator_tag();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct X { int a; };
|
struct X { int a; };
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user