Adrian wrote:
> On Apr 18, 3:35 pm, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
>>> Then also doesnt this apply to using &mixed[0] and
>>> &mixed[mixed.length()]
>>
>> Doesn't WHAT apply? The overloaded operator[] returns a reference.
>> You can take the address of it to get the address of the referred
>> object.
> That the elements would have to be an array.
No. Overloaded operator[] is called for the object and that does
not *at all* imply that there is an array of any kind. Example:
'std::map' has operator[] defined for it, yet, in all implemenations
I've encountered, there was no array. There is a tree (R-B tree, to
be exact), but no array.
Overloading operator[] allows you to use the particular syntax with
an object of that class, the same syntax that you use to index within
an array. Do not confuse the two.
>> You're essentially spending your precious time trying to find some
>> elusive solution (which may or may not exist) for the sake of some
>> performance problem you may or may not even have. Does that pretty
>> much sum up what you're trying to do here?
> I am sorry I thought this was comp.lang.c++ a discussion group.
You thought correctly. And I am discussing. Do you have a problem
with what I said? Would you like to present a rebuttal? By all
means, I'll be happy to discuss.
> If you dont wish to discuss or reply feel free to go to the next
> thread
Oh, thanks for your permission. I didn't know I needed one from you.
>
Have a nice day!
You bet!
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask