Subject: Re: commit -- operator[] for UT_String
From: Michael D. Pritchett (mpritchett@attglobal.net)
Date: Sun Apr 15 2001 - 17:06:36 CDT
From: Joaquín Cuenca Abela <cuenca@celium.net>
Sent: Saturday, April 14, 2001 2:13 PM
> operator[] and operator[] const for UT_String
>
> Cheers,
>
> --
> Joaquín Cuenca Abela
> cuenca@celium.net
>
Joaquin -
MSVC 5.0 is having difficultly with this:
char& UT_String::operator[](size_t iPos)
{
UT_ASSERT(iPos <= size());
return pimpl->data()[iPos];
}
saying something about return cannot convert 'const char' to 'char &'.
Substituting
return (char) pimpl->data()[iPos];
allows it to compile and continue, but I am not sure if this is what you
wanted.
Cheers!
Michael D. Pritchett
This archive was generated by hypermail 2b25 : Sun Apr 15 2001 - 17:45:50 CDT