Has anyone found the need to declare the return parameter of a copy assignment operator const?

前端 未结 7 2068
误落风尘
误落风尘 2020-12-14 12:02

The copy assignment operator has the usual signature:

    my_class & operator = (my_class const & rhs);

Does the following signatur

7条回答
  •  甜味超标
    2020-12-14 13:06

    As in any other usage of const, const is the default, unless you really want to let the user change.

提交回复
热议问题