The following function declaration:
void func(MyClass & const myClassObject);
is illegal, because of the 'const'.
The 'const' in the following declaration:
void func(MyClass * const myClassObject);
is useless, because the pointer is passed by value, so the 'const' does not add anything.
Reference: Exceptional C++ by Herb Sutter. Addison-Wesley, 1999, p. 181.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment