Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 512 Bytes

functionConst.md

File metadata and controls

11 lines (6 loc) · 512 Bytes

Pattern: Non-const member function

Issue: -

Description

The member function can be made a const function. Making this function const should not cause compiler errors. Even though the function can be made const function technically it may not make sense conceptually. Think about your design and the task of the function first - is it a function that must not change object internal state?

Further Reading