Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-06 00:14:53


----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, March 05, 2001 10:43 PM
Subject: Re: [boost] Named template parameters

>
> Hmm, I think I missed a turn in the road earlier on ;)
>
> Are you suggesting the following?
>
> template <class Base,
> class Policies,
> class ValueOrNamedParameters = boost::detail::default,
> class ReferenceOrNamedParameters = boost::detail::default,
> ...>
> class iterator_adaptor;
>
> and could then be used like the old way:
>
> iterator_adaptor<int*, default_iterator_policies, int, int&, ...>
>
> and could also be used like this:
>
> iterator_adaptor<int, default_iterator_policies,
> iterator_traits_builder
> ::reference<int>
> ::iterator_category<std::input_iterator_tag>

Well, perhaps this, to show equivalence

iterator_adaptor<int*, default_iterator_policies,
  iterator_traits_builder
  ::value_type<int>
  ::iterator_category<std::input_iterator_tag>::type>

but also (equivalently) this:

iterator_adaptor<int, default_iterator_policies,
  int,
  iterator_traits_builder
  ::iterator_category<std::input_iterator_tag>::type>

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk