4 ms·
const-by-default is definitely nice. Does this extend to both sides of a pointer type? Does int * refer to int const * const? There is nothing wrong with [&] f
by leni536 4y ago
const-by-default is definitely nice. Does this extend to both sides of a pointer type? Does int * refer to int const * const?
There is nothing wrong with [&] for short-lifetime lambdas. Lambdas passed to std algorithms or immediately invoked lambdas come to mind.
edit:
Are data members also const by default? How do I declare a non-const data member that is const when accessed within a const member function? (so non-const non-mutable in original c++)
- compiler-devel 4y agoIn my first release I didn't address pointers or references and need to think on them further. I'll release updates over time that address these as well as many of the great ideas that I've received from other commenters.