$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2002-10-07 12:26:57
> 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>());
For exact syntax consult MPL list specification.
Gennadiy.