All overloads of assignment operators of std::slice_array
are const member functions, but why is it designed so?
Maybe the reason is that std::slice_array
is designed to be a proxy class, and these assignment operators just modify the referred elements without modifying the proxy class itself, so they are reasonable to be const member functions. However, why are those compound operators of std::slice_array
not const member functions?