nl_namespace_two_to_one_liner
Category: Newline adding and removing options
Type: boolean [false, true]
Default: false
Whether to collapse a two-line namespace, like 'namespace foo\n{ decl; }'
into a single line. If true, prevents other brace newline rules from turning
such code into four lines. If true, it also preserves one-liner namespaces.
| raw CPP code | nl_namespace_two_to_one_liner=false | nl_namespace_two_to_one_liner=true | nl nl_namespace_two_to_one_liner=true |
|---|---|---|---|
| using namespace std::string_literals; namespace A{int i;}; namespace B{int i;int j;namespace C{namespace D{int k;}}} | using namespace std::string_literals; namespace A {int i;}; namespace B {int i; int j; namespace C {namespace D {int k;}}} | using namespace std::string_literals; namespace A {int i;}; namespace B {int i; int j; namespace C {namespace D {int k;}}} | using namespace std::string_literals; namespace A {int i;}; namespace B {int i;int j;namespace C {namespace D {int k;}}} |
Not the best code for this option? See how to improve the .uds file used to generate these examples.