> ok, the standard say nothing about operator [] but for at it is "<",
> but! you also see special code in
> 
> lyxstring::const_reference lyxstring::operator[](size_type pos) const
> {
>       lyx::Assert(pos <= rep->sz); // OURS!
>       static char helper = '\0';
>       return pos == rep->sz ? helper : rep->s[pos];
> }
> 
> 
> to handle the pos == rep->sz case... and to me this seems a bit
> bogus.. I wonder why it was added...


Probably because a lot of old string implementations used \0 termination
and there might be code depending on it.

I find it a bit disgusting, though...

Andre'

-- 
André Pönitz ............................................. [EMAIL PROTECTED]

Reply via email to