[Proposal]: make const member functions of height() and width() #1748
Replies: 3 comments 1 reply
-
The value returned is not constant, the returned values are protected and the fuction is virtual so I am not sure why this is desirable. Please elaborate on the reason for the suggestion. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for your feedback.
This means or says that calling this member function does not change the Object itself. This does not mean that the member (here height) is a const value. I mean make a const member function, not make the variables itself const. |
Beta Was this translation helpful? Give feedback.
-
the key word const promises to the compiler that this function does not change the object. |
Beta Was this translation helpful? Give feedback.
-
I have a proposal to make only reading functions
const
.See:
So please make it:
Beta Was this translation helpful? Give feedback.
All reactions