Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-08-01 03:21:44

On Thu, 2008-07-31 at 14:20 -0500, Michael Marcin wrote:
> Daniel Frey wrote:
> > On Thu, 2008-07-31 at 12:16 -0500, Michael Marcin wrote:
> >>
> >> Be sure to check the size of your type with your compiler. Some embedded
> >> and DSP compilers in the past made types that derive from operators
> >> larger. Although I think that was partially due to a operators bug that
> >> was fixed a long time ago.
> >
> > AFAIK that's not a bug in the operators library, but an inefficiency in
> > the compiler's ABI (the EBO actually, which misses some optimization
> > opportunities for multiply inheritance from empty base classes).
> I was referring to which bit
> me on a project where we had a fixed-point 3 coordinate vector which had
> operators which contained a fixed-point types which had operators.

That won't help in Neal's code unless he starts using the base class
chaining. Since empty_base only takes T into account (not U if
available), Neal's code would still contain the same base class (empty<
fixed_pt<int_bits,frac_bits,base_type,error_policy,round_policy> >)
multiple times, which might lead to some bloat.

Regards, Daniel

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