On Fri, 9 May 2014 05:17:42 -0700 (PDT), Nicky Perian wrote:

> >"array[i]" instead of "array.get(i), etc...
> 
> 
> old code snip  const Type& get(S32 index) const { return 
> std::vector<Type>::operator[](index); }
> 
> Is array[i] same as operator[](i) ?

Yep. It's just the way the [] operator is declared in C++. See:
http://www.cplusplus.com/reference/vector/vector/operator%5B%5D/

> I notice "operator[](i)" is used in the interesting,

With std::vector, you could also use array.at(i), which is equivalent.

Henri.
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to