Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Example code style

Andrew Falaleev edited this page Nov 6, 2018 · 3 revisions
namespace a { namespace b {

enum class c : uint8_t {

};

void foo() {

}

struct A {
    virtual void invoke() = 0;

    virtual ~A() = default;
};

class bar {
public:
    bar() {}

    virtual ~bar() {
    }

protected:
    void megabar() {
    }

private:
    int d_;
};

class foo final:
    public bar,
    public A {
public:
    void invoke() override {

        for () {
        }

        if () {
            std::cerr<<"!"<<std::endl;
        } else {

        }
    }
    ~foo() = default;
};

template <
    typename T,
    typename T1,
    typename T2,
    typename T3,
    typename T4,
    typename T5
>
void foo1() {

}


void foo1(
    int a,
    int a1,
    int a2,
    int a3,
    int a4,
    int a5,
    int a6,
    int a7
) {

}

class person {
public:
    const std::string& name() const {
      return name_
    }

    void name(const std::string& new_name) {
      name_ = new_name;
    }

private:
    std::string name_;
};

} } // a::b
Clone this wiki locally