Missing space between auto and square bracket in structured binding when using reformat code
Answered
Reformat code with the Default IDE scheme removes the space between auto and the square bracket, so
auto [x, y] = f();
becomes
auto[x, y] = f();
Where in the C++ code style settings can I specify to keep that space?
Please sign in to leave a comment.
Hello!
unfortunately, there is no settings to prevent removing space between auto and square bracket. Please feel free to follow the ticket, comment and upvote it https://youtrack.jetbrains.com/issue/CPP-17327 if you are not familiar with YouTrack.
Or you can use ClangFormat (https://www.jetbrains.com/help/clion/clangformat-as-alternative-formatter.html) to avoid the problem.
Regards,
Maxim
Thanks for creating the ticket, I will look for a ClangFormat config that fixes it.