Subject: Re: [boost] [optional] generates unnessesary code for trivial types
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-02-11 20:27:45
on Thu Feb 09 2012, paul Fultz <pfultz2-AT-yahoo.com> wrote:
> Actually, you could just take the optional_traits as the first parameter. So you define
> optional<T> or optional<optional_traits<my_traits<T> > >. Then optional would be
> specialized for optional_traits that will get the user-defined traits.
Be aware that tricks like this start to break down in generic contexts,
as optional_traits<T> specializations are treated differently by
optional from all other types.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk