Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2007-08-21 11:11:09


> From: Paul A Bristow

> 1 "The implementation heavily relies on the capability of a
> compiler to perform EBO (the Empty Base-class Optimization). Lack of
> this capability can decrease size (and possibly speed)
> performance of the generated code."
>
> Do you mean Lack of this capability can *increase* size and
> decrease performance...??

No, I meant it can decrease size performance and speed performance, but I'll
rewrite the sentence to be more clear. ;-)

> You could be specific about what Borland option is needed for EBO.

Good point. By the way, are there users of some current versions of Borland?
Does this still hold that the '-Ve' switch has to be used?

> 2 I don't see any examples with floating-point. Does this
> mean that it is only suitable for integral types? Could a
> floating-point type set to a NaN if out of bounds?

Any value type with 'normal' semantics can be used (with exception of wrapping -
the underlying type must represent integers, although not necessarily integral)
-- see examples with strings. The problem with floats is that they are not
'normal' - see http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17.
Therefore this may make it impossible for constrained float to guarantee its
invariant (I'm not completely sure about this, but at least extreme care should
be taken when trying to use float as constrained underlying value). I'll add a
note on this issue.

> 3 Some inline comments on the example could explain why some
> definitions are so verbose - for those who have yet to RTFM ;-)

Which particular definitions you mean?

Thanks a lot for help,
Robert


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