I have a lambda function formatted like this:
auto cb = [](std::string const& _param)
{
std::cout << _param;
};
I would like to keep the opening brace on a new line, but clang-format always places it at the end of the first line. Is it possible to configure clang-format to follow the style above?
The relevant part of my current configuration looks like this:
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: true
BreakBeforeBraces: Allman
I would also like to do the same for extern blocks:
extern "C"
{
// ...
}
clang-formatare you using? This might be a bug: mail-archive.com/[email protected]/msg05471.html - syntagma