22 Mar
2016
22 Mar
'16
8:51 a.m.
On 03/21/2016 07:04 PM, Paul Fultz II wrote:
However, with lambdas it is the opposite. Lambdas default to const and then an explicit mutable keyword is needed for a mutable function object.
The const-by-default lambdas are the black swans of C++. The fit documentation should at least provide a design rationale for its const-by-default decision which is addressed at those who are unfamiliar with the virtues of immutability. Another concern with fit::mutable_ is its name. As you have already gone down the type-traits naming path with fit::decay, it may be an idea to rename fit::mutable_ to fit::remove_const.