Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-10-07 14:20:31


----- Original Message -----
From: "Rozental, Gennadiy" <gennadiy.rozental_at_[hidden]>
To: "'Boost mailing list'" <boost_at_[hidden]>
Sent: Monday, October 07, 2002 7:26 PM
Subject: RE: [boost] Re: new initialization lib, any interest?

> > Why not make an iterator adaptor (initialization_iterator?)
> > that holds a list of values with which to initialize. And
> > then pass it to any of the STL containers. (I can post my
> > implementation if it's interesting):
> >
> > std::list<int> primes(
> > make_init_iterator<int>(2)(3)(5)(7)(11)(),
> > make_init_iterator<int>());
>
> I like this idea. But proposed interface look like a waste since all of
the
> argument are know at compile time.
>
> I would rather preper:
>
> std::list<int> primes(
> make_init_iterator<int, mpl::ct_list<2,3,5,7,11> >(),
> make_init_iterator<int>());
>

WRT easy use, this is worse than the first. It would
definitely only be used by library implementors which is not the idea with
the init stuff.

regards

Thorsten
nesotto_at_[hidden]
---------------------------------------------------


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