No, a const
object of this class type should not be able to change the object. Thus we should not define const
version of push_back
or pop_back
. Although the complier does not report errors if we define const
versions of push_back
and pop_back
, it is not logical for a const
object.