|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2005-01-28 14:32:37
Aleksey Gurtovoy wrote:
> Alexander Nasonov writes:
> >> > What if you have 400? Can mpl::vector or mpl::set contain 400
> >> > elements?
> >>
> >> 'mpl::set' definitely can. Structurally, it's not very different
> >> from an "overload set".
> >
> > I wonder how to create such a huge set. By inserting elements 400
> > times?
>
> That would be one way.
>
> > How much compilation time would it take then?
>
> Depends on the compiler. On my G5, CodeWarrior 9.2 swallowed the
> following in ~15 sec:
>
> typedef copy<
> range_c<int,0,400>
> , inserter< set<>, insert<_1,_2> >
> >::type r;
15 seconds, wow! It takes more then 5 min on my centrino :(
> >> Interesting. How do you generate these in the first place?
> >
> > typedef overload_set<overloads, range_c<int,1,701> > huge_set;
> > struct overloads contains 700 call operators.
>
> Hand-written?
No. I typed one function in vim editor:
void operator()(id<1>, struct X1*) const;
and then pressed:
qqyyp<CTRL-a>l<CTRL-a>q698_at_q
This magic sequence inserts 699 lines similar to first one
but with incremented numbers.
Aleksey,
Do you you have ideas how to inegrate mpl and overloads? If I understood
you correctly, you're positive about changing mpl algorithm to
iter_applyN scheme. Right?
If so, what would be the best strategy? New CVS branch for
iter_applyN-based mpl?
Where should I store overloads algorithms? In my CVS repository or in
boost[-sandbox] CVS?
-- Alexander Nasonov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk