Compiler Error C3481
'var': lambda capture variable not found
The compiler could not find the definition of a variable that you passed to the capture list of a lambda expression.
To correct this error
- Remove the variable from the capture list of the lambda expression.
Example
The following example generates C3481 because the variable n
is not defined:
// C3481.cpp
int main()
{
[n] {}(); // C3481
}
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for