good to know some others are also bothered with the "const"
issue, and try to find a way to solve this problem.
"deducing this" proposal is useful, if it is accepted, developer can use it to inject additional methods to an existing class which developer is not able to make change to its internal implementation.
in my opinion, it is useful, but it's not a good solution to "const" issuemy proposal is not a workaround for "const" issue, it is an extension to "const" keyword, so it is straight forward, and intuitive to developers (to read/write code), and easy to implement too.
Best Regards,
Jianping
--On Fri, Dec 13, 2019 at 7:58 AM jianping z via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
Hi all,
I have a proposal to add a const-able feature to the language in
addition to "const" keyword. it can greatly reduce the duplicated code
written for const and non-const method/function pair.
It sounds like this has some overlap with "Deducing this": http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0847r2.html
Arvid Norberg