mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-29 20:37:17 +02:00
removed unnecessary typedefs from counting_iterator_traits
[SVN r9203]
This commit is contained in:
@ -28,6 +28,8 @@
|
|||||||
// Incrementable.
|
// Incrementable.
|
||||||
//
|
//
|
||||||
// Revision History
|
// Revision History
|
||||||
|
// 14 Feb 2001 Removed unnecessary typedefs from counting_iterator_traits
|
||||||
|
// (Jeremy Siek)
|
||||||
// 11 Feb 2001 Use BOOST_STATIC_CONSTANT (Dave Abrahams)
|
// 11 Feb 2001 Use BOOST_STATIC_CONSTANT (Dave Abrahams)
|
||||||
// 11 Feb 2001 Clean up after John Maddocks's (finally effective!) Borland
|
// 11 Feb 2001 Clean up after John Maddocks's (finally effective!) Borland
|
||||||
// fixes (David Abrahams).
|
// fixes (David Abrahams).
|
||||||
@ -164,9 +166,6 @@ struct counting_iterator_traits {
|
|||||||
)> binder;
|
)> binder;
|
||||||
typedef typename binder::template traits<Incrementable> traits;
|
typedef typename binder::template traits<Incrementable> traits;
|
||||||
public:
|
public:
|
||||||
typedef Incrementable value_type;
|
|
||||||
typedef const Incrementable& reference;
|
|
||||||
typedef const value_type* pointer;
|
|
||||||
typedef typename traits::difference_type difference_type;
|
typedef typename traits::difference_type difference_type;
|
||||||
typedef typename traits::iterator_category iterator_category;
|
typedef typename traits::iterator_category iterator_category;
|
||||||
};
|
};
|
||||||
@ -193,9 +192,9 @@ struct counting_iterator_generator
|
|||||||
|
|
||||||
typedef iterator_adaptor<Incrementable,
|
typedef iterator_adaptor<Incrementable,
|
||||||
counting_iterator_policies<Incrementable>,
|
counting_iterator_policies<Incrementable>,
|
||||||
typename traits::value_type,
|
Incrementable,
|
||||||
typename traits::reference,
|
const Incrementable&,
|
||||||
typename traits::pointer,
|
const Incrementable*,
|
||||||
typename traits::iterator_category,
|
typename traits::iterator_category,
|
||||||
typename traits::difference_type
|
typename traits::difference_type
|
||||||
> type;
|
> type;
|
||||||
@ -206,19 +205,8 @@ template <class Incrementable>
|
|||||||
inline typename counting_iterator_generator<Incrementable>::type
|
inline typename counting_iterator_generator<Incrementable>::type
|
||||||
make_counting_iterator(Incrementable x)
|
make_counting_iterator(Incrementable x)
|
||||||
{
|
{
|
||||||
typedef counting_iterator_traits<Incrementable> traits;
|
typedef typename counting_iterator_generator<Incrementable>::type result_t;
|
||||||
|
return result_t(x);
|
||||||
// These typedefs appease MSVC
|
|
||||||
typedef typename traits::value_type value_type;
|
|
||||||
typedef typename traits::reference reference;
|
|
||||||
typedef typename traits::pointer pointer;
|
|
||||||
typedef typename traits::iterator_category iterator_category;
|
|
||||||
typedef typename traits::difference_type difference_type;
|
|
||||||
|
|
||||||
return iterator_adaptor<Incrementable,
|
|
||||||
counting_iterator_policies<Incrementable>,
|
|
||||||
value_type, reference, pointer, iterator_category,difference_type
|
|
||||||
>(x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user