From: Warren Young Date: September 19 2005 5:16pm Subject: Re: [patch] row::operator[](int) List-Archive: http://lists.mysql.com/plusplus/4952 Message-Id: <432EF288.5080003@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Chris Frey wrote: > + const ColData operator [](int i) const It happens to work, but it makes me nervous. The problem is that const_subscript_container requires operator[](SizeType), where SizeType is an unsigned int. That's reasonable, since these containers should never be indexed with a negative number. But '0' outside any other context is a plain int in C++, which is where the ambiguity comes in. With this second integer overload, we essentially have duplicate code, and all the problems that come with it. I'd be less against simply changing SizeType to be a plain int and letting that change ripple through the hierarchy (don't forget Fields and FieldNames!) but that would break the ABI.