Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
a lambda definition cannot have any cv-qualifiers
Remarks
You can't use a const or volatile qualifier as part of the definition of a lambda expression.
This error is obsolete in Visual Studio 2022.
To correct this error
- Remove the
constorvolatilequalifier from the definition of your lambda expression.
Example
The following example generates C3485 because it uses the const qualifier as part of the definition of a lambda expression:
// C3485.cpp
int main()
{
auto x = []() const mutable {}; // C3485
}
To fix it, remove the const qualifier.