Closed
Description
The following snippet
#include <functional>
namespace Short {
void foo() {}
} // namespace Short
namespace LongNameSpace {
void foo() {}
} // namespace LongNameSpace
struct Test {
Test()
: l([] {
Short::foo();
LongNameSpace::foo();
}) {}
std::function<void()> l;
};
formattted with clang-format-17 using the following configuration
Language: Cpp
AlignConsecutiveDeclarations: Consecutive
is formatted in the following way using clang-format-18
#include <functional>
namespace Short {
void foo() {}
} // namespace Short
namespace LongNameSpace {
void foo() {}
} // namespace LongNameSpace
struct Test {
Test()
: l([] {
Short:: foo();
LongNameSpace::foo();
}) {}
std::function<void()> l;
};
as you can see the the foo invoked from a shortnamespace is detached from it.