CArray::operator[] (int) const 
Author Message
 CArray::operator[] (int) const

Is there some deep C++ reason that I am missing as to why

        CArray::operator[] (int) const

returns (TYPE) instead of (const TYPE&)? Shouldn't a const reference
be as "secure" as just the straight object (copy) and more efficient
for non-scalar TYPE?

This difference in behaviour between the const and non-const versions
is not the most obvious thing I've seen.



Mon, 18 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. int &operator[](int)const;

2. typedef int COMPARE(const void *, const void *);

3. char *fnpars(const char *fn, int p, int v)

4. CArray query [const problem]

5. 'operator =' for CArray derived class

6. CString/CArray and Overloaded = Operator

7. operator= and CArray

8. Style question: "int const" versus "const int"

9. Help: inline char const* const& max(char const* const &a, char const* const &b)

10. _variant_t operator= (const wchar_t*)

11. |const| as an operator

12. int func(int) versus int func(int *) efficacy.

 

 
Powered by phpBB® Forum Software