On Tue, 2008-09-02 at 15:37 +1200, Amos Jeffries wrote:

> There are two versions of this needed;
> 
>   One: const char ...() const;  for read-only access to a char. With tests
> returning NULL char or other safe abortion for out-of-range requests.
> 
>   The other: char ...();  for write-access, with full tests for string
> expansion if necessary to store the new data.

you probably meant "char &()" for the second one, but please be extra
careful there: There are C++ gurus that consider write character access
in a string via a char reference nearly impossible to implement safely.

My recommendation is to drop character access, especially the writeable
character access via a reference from any buffer- or string-related
class.

HTH,

Alex.


Reply via email to