|
Boost : |
From: Gennadiy E. Rozental (rogeeff_at_[hidden])
Date: 2001-10-03 16:32:02
--- In boost_at_y..., Levente Farkas <lfarkas_at_m...> wrote:
> hi,
> this's from iterator_adaptors.hpp:
> --------------------
> template <class Base, class Policies,
> class Value = detail::default_argument,
> class Reference = BOOST_ARG_DEPENDENT_TYPENAME
detail::choose_default_argume
> nt<Value>::type,
> class Pointer = BOOST_ARG_DEPENDENT_TYPENAME
detail::choose_default_argument
> <Reference>::type,
> class Category = BOOST_ARG_DEPENDENT_TYPENAME
detail::choose_default_argumen
> t<Pointer>::type,
> class Distance = BOOST_ARG_DEPENDENT_TYPENAME
detail::choose_default_argumen
> t<Category>::type
> >
> --------------------
> I don't look into this deeply and I don't know how
BOOST_ARG_DEPENDENT_TYPENAME
> working, but isn't these arguments shifted by 1?
> eg:
> class Reference = BOOST_ARG_DEPENDENT_TYPENAME
> detail::choose_default_argument<Value>::type,
>
> shouldn't have to be
>
> class Reference = BOOST_ARG_DEPENDENT_TYPENAME
> detail::choose_default_argument<Reference>::type,
>
> just my 2c at the first sight.
>
> -- Levente "Si vis pacem para
bellum!"
No.
Implementation is pritty tricky. Look carefully into iterator_adaptor
and details/named_template_params.hpp for details. Specificly look
onto the template argument name for details::choose_default_argument
Gennadiy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk