Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-31 15:46:06


Howard Hinnant <hinnant_at_[hidden]> writes:

> On Friday, January 31, 2003, at 12:54 PM, Jonathan Wang wrote:
>
>> The default features(types) are stored in a
>> type-vector, and we can use boost.mpl to update the
>> default features into use-defined ones, and to
>> extract the updated paramters from type-vector. Then
>> we can use NTPs later. And even can we mix the NTPs
>> and the ordinary paramters, just to use ntp::update2
>> instead of ntp::update.
>
> I've also looked at ntp implementation similar to this
> (but used Loki type lists), and agree that this is a
> neat way to go. Essentially you just stick the
> defaults onto the end of the type list. Then if the
> user specifies anything, either by a default tag, a
> named parameter, or a positional parameter, you prepend
> it to the type list. Then the extraction routine
> simply searches the type list for the first appropriate
> parameter.

That's how my "defaults by type properties" thing works as well. I
wonder if a single framework could be used to handle both approaches?

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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