नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'this' is always captured by value: '&' ignored
Remarks
You cannot capture the this pointer by reference.
To correct this error
- Capture the
thispointer by value.
Example
The following example generates C3496 because a reference to the this pointer appears in the capture list of a lambda expression:
// C3496.cpp
// compile with: /c
class C
{
void f()
{
[&this] {}(); // C3496
}
};