S
Stub
What does it mean that "C++ silently write and call address-of operators"?
Stub said:What does it mean that "C++ silently write and call address-of operators"?
Stub said:What does it mean that "C++ silently write and call address-of operators"?
Actually that is not true. No implementation is provided by default.Nilesh said:It means that you do not have to explicitally write 'operator &', just
as you dont have to write 'operator ='. C++ will silently provide its
own implementation.
Nilesh said:It means that you do not have to explicitally write 'operator &', just
as you dont have to write 'operator ='. C++ will silently provide its
own implementation.
operator and operator '&' in this respect. C++ does not "provide its own
implementation" for member operator &, silently or not.
wogston said:I thought it does, unless you define own = operator, copy the members using
their respective = operators. What is the correct wording of this? Seems
that is the only thing you disagree about as far as I can tell.
...
Ron Natalie said:Actually that is not true. No implementation is provided by default.
& is just one of those operators that has a native meaning when not
overloaded. This is distinct from the copy assignment operator which
when not declared is implicitly generated.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.