|
Boost : |
Subject: Re: [boost] Formal Review Request: TypeErasure
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-05-29 06:04:48
on Tue May 22 2012, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
>
> Online documentation can be found here:
> http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/
The types of the arguments must match or the behavior is undefined.
I presume you mean that the dynamic, erased types must match?
(presumably you could easily prevent the use of different static types at
compile-time). IMO it's crucial that you be rigorous about these
distinctions in your documentation.
I wonder if undefined behavior is really the best possible choice here.
I honestly don't know what's most useful. Do you have a rationale for
your choice?
Also, I must add that the following sentence is so diametrically opposed
to the one above that putting it in a different paragraph doesn't help
the reader enough to deal with the cognitive dissonance:
The operands do not all have to be the same type.
Cheers,
-- 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