|
Boost : |
From: David A. Greene (greened_at_[hidden])
Date: 2002-04-06 11:11:43
Gennadiy Rozental wrote:
>>I'm wondering if it would be possible to create a
>>generic library to provide named template parameters.
>>Is this a worthwhile endeavor? Of course a lot of
>>code exists in the iterator_adaptor detail namespace,
>>but it is tied to the specific policies that
>>iterator_adaptor uses.
> I also think that named template parameters worth separating into library.
> It brings valueable functionality that could be reused.
I can think of two different solutions to the problem. The first
is the approach takn by iterator_adaptor. The second (which I am
investigating now) involves aggregating the policies into a typelist
and then doing a key search to find which policies have been
specified (via tags _a_la_ iterator_adaptor). The typelist
approach has the following advantages:
- Fewer template parameters
- Backward compatability if/when policies are added or removed
The second point really leads me to think that a typelist approach
might be the way to go. Can anyone argue for the method used by
iterator_adaptor? I want to make sure I'm not missing something
important. These aren't mutually exclusive, either -- I'll probably
have fun working on both. :)
-Dave
-- "Some little people have music in them, but Fats, he was all music, and you know how big he was." -- James P. Johnson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk