Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Two proxy classes in main class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Bart van Ingen Schenau, post: 4181741"] Why? What good is it to declare an operator= on a class that is not supposed to support assignment? This operator= should be left out completely. As _Low_Byte_Const has a reference-type member (m_data), the compiler will not be able to generate an operator= and that is exactly the behaviour you want. This operator= should be left out as well. You don't want to support assignment of an integer, so you should not provide any operators that would be used in such an assignment. No. If the function itself does not modify *this and is also does not pass pointers or references to other functions that might cause modification of *this, then it is sufficient to have only one, const-qualified, function. This function can be used both by const and non-const objects. Bart v Ingen Schenau [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Two proxy classes in main class
Top