|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-02-27 10:25:26
Thanks for bringing this up Aleksey! Looks really interesting.
I'm wondering whether or not the Base type should really be a parameter of
iterator_traits builder, or if iterator_traits_builder should look more
like std::iterator<>.
On Tue, 27 Feb 2001, Aleksey Gurtovoy wrote:
alexy>
alexy> template<
alexy> class Base
alexy> , class Value = BOOST_ARG_DEPENDENT_TYPENAME
alexy> boost::detail::iterator_traits<Base>::value_type
alexy> , class Reference = BOOST_ARG_DEPENDENT_TYPENAME
alexy> boost::detail::iterator_defaults<Base,Value>::reference
alexy> , class Category = BOOST_ARG_DEPENDENT_TYPENAME
alexy> boost::detail::iterator_traits<Base>::iterator_category
alexy> , class Distance = BOOST_ARG_DEPENDENT_TYPENAME
alexy> boost::detail::iterator_traits<Base>::difference_type
alexy> , class Pointer = BOOST_ARG_DEPENDENT_TYPENAME
alexy> boost::detail::iterator_defaults<Base,Value>::pointer
alexy> > struct iterator_traits_builder {
alexy>
alexy>
alexy> template<class U> struct value : iterator_traits_builder<U,
alexy> Reference, Category, Distance, Pointer> {};
alexy> template<class U> struct reference : iterator_traits_builder<Value, U,
alexy> Category, Distance, Pointer> {};
alexy> template<class U> struct category : iterator_traits_builder<Value,
alexy> Reference, U, Distance, Pointer> {};
alexy> template<class U> struct distance : iterator_traits_builder<Value,
alexy> Reference, Category, U, Pointer> {};
alexy> template<class U> struct pointer : iterator_traits_builder<Value,
alexy> Reference, Category, Distance, U> {};
alexy> };
Oops, in the above uses of iterator_traits_builder you forgot the
first argument: the Base type ;)
Cheers,
Jeremy
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate email: jsiek_at_[hidden]
Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk