TLoe
TLoe

Reputation: 141

Is oneline namespaces on one line with clang-format possible?

Is there a way to get clang-format to put oneline namespaces on one line like below? I need to do some forward declarations and I prefere to put it like this.

namespace One {
    namespace Two { class MyClassA; }
    namespace Two { typedef std::unique_ptr<MyClassA> MyClassAUPtr; }

    namespace Two { class MyClassB; }
    namespace Two { typedef std::unique_ptr<MyClassB> MyClassBUPtr; }

    namespace Three { class MyClassC; }
    namespace Three { typedef std::unique_ptr<MyClassC> MyClassCUPtr; }
}

Upvotes: 2

Views: 599

Answers (1)

Ted Lyngmo
Ted Lyngmo

Reputation: 117871

No, as of clang-format 13, there is no such option.

Upvotes: 3

Related Questions