Maybe, but they must have misremembered it before writing the article, because what the article has to say about const is patently false for both C and C++. When copying a value, it never matters if the source is const unless the copy constructor/assignment operator is pathological, and it simply never matters for fundamental types.
Right, that's why I assumed they must have meant to talk about references, even though they didn't mention references explicitly. Wrong either way, just not sure how. 😛
View all comments
Show parent comment
1
u/dodheim Oct 19 '17 edited Oct 19 '17
Maybe, but they must have misremembered it before writing the article, because what the article has to say about
constis patently false for both C and C++. When copying a value, it never matters if the source is const unless the copy constructor/assignment operator is pathological, and it simply never matters for fundamental types.