Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-08-10 22:38:07


on Fri Aug 10 2007, David Abrahams <dave-AT-boost-consulting.com> wrote:

>> That's why I still prefer a more conservative approach:
>>
>> my_class< policy_packer<policy_b<param_b>, policy_a<param_a> >::type >
>>
>> so that my_class is the same type for the same policy combination. Call
>> me conservative but I still prefer seeing a definition like this:
>
> Bleah, if you don't mind my saying so :-)
>
> my_class<policy_b<param_b>, policy_a<param_a> >::normalized_type
>
> would be nicer.

My point being that people who weren't worried about this issue could
still just use

      my_class<policy_b<param_b>, policy_a<param_a> >

But that said, this is all premature optimization at a real cost to
expressivity. Build the cleanest, nicest interface you can give your
users, and if you're worried about performance, then optimize. You're
not looking at some big-O difference that should influence the design
up front.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

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