Boost logo

Boost :

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at