250216 (1) [Avatar] Offline
The code in listing 3.1.2 is used to explain when to use mutable as part of the lambda-declarator. However, I believe there is an error in this example; it does not need to marked mutable. Only when one wishes to modify a variable that has been captured by value does one need to use mutable.

I have verified that the code, modified by removing the mutable keyword, compiles under the current versions of GCC, clang, and MSV++.

I believe the relevant portions of the C++14 standard are section 5.1.2, paragraphs 5, 15 and 16.
Ivan Cukic (94) [Avatar] Offline
It should be fixed now. Thanks for reporting.