From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-10 14:53:16
Thorsten Ottosen wrote:
> "Peter Dimov" <pdimov_at_[hidden]> wrote in message
>>> If you think this is a problem, you should discuss it with Thorsten.
>> I'm not looking forward to that.
> Please do anyway. If you think there is a major problem in the
> defaults of the Range library, please say so.
I think that defining size( T[N] ) as N or N-1, depending on whether T is a
character type, will cause problems in generic code and preclude the
widespread use of the library.
Looking at the actual contents of the array for a NULL terminator can be
even worse, as it may easily lead to undefined behavior.
In addition, this definition will not adapt well if other character types
are added as part of Unicode-ification, in particular, if these character
types are typedefs.
I, for one, will be avoiding the library because of these issues. "Do the
right thing" is a design principle that I usually advocate, but in this
specific case I believe that doing the predictable and consistent thing is
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk