नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
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.