improper indention for c++ lambda in visual studio when auto formatting code
孟轩 郝
6
Reputation points
I have a function "func" which takes another function as its parameter.
If I define a function with more than one line using lambda expression when calling "func", the auto formatting (ctrl+k,ctrl+d) seems to get confused.
This is what I think the supposed format:
And this is the result using auto format (ctrl+k,ctrl+d):
The alignment of the line "int b=1;" and "return a+b" gets weird.
I'm wondering if this a buf of visual studio or it has something to do with my settings.
Thanks.