const_func.cc:6:13: error: cannot assign to non-static data member within const member function 'SetExI'
this->ex_i_ = ex_i;
~~~~~~~~~~~ ^
const_func.cc:5:6: note: member function 'Example::SetExI' is declared const here
auto SetExI(const int& ex_i) const -> void {
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
이걸 사용하면 의도치 않게 멤버를 변경하게 되는 등의 실수를 미연에 방지할 수 있겠다 그쵸?