Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-18 13:36:00


"David B. Held" <dheld_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:un0lyy3d0.fsf_at_boost-consulting.com...
>> [...]
>> In Boost.Python I'm using a system for interfaces such as this one
>> where optional template parameters can be passed in any order.
>> I'm using the properties of the type to detect their meaning. It
>> works great. Using boost/mpl/has_xxx.hpp (and, for compilers
>> which don't support it, is_base_and_derived) should be enough to
>> build a nice policy-based interface.
>
> By "works great", do you mean it works great for you as a library
> implementor, or it works great for users, and they feel it is a good
> way to specify policies?

Yes. Actually I don't think most of my users think they're specifying
policies when they do this -- you could even argue that my design
isn't policy-based, but that's really beside the point because the
crucial feature is that there are many parameters with useful
defaults. It just works and nobody thinks about it. I've never had a
support request or question related to this part of the interface.

-- 
                       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