
12 Feb
2012
12 Feb
'12
1:27 a.m.
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