Set of rules that you might use if you have no better ideas, but the real aim is consistency, rather than any particular rule set.
- NL.16: Use a convetional class member declaration order
- NL.18: Use C++ style declarator layout
- NL.25: Don't use
void
as an argument type - NL.26: Use conventional
const
notation
class X{
public:
// interface
protected:
// unchecked function for use by derived class implementations
private:
// implementation details
};
T& operator[](size_t); // do
T &operator[](size_t); // weird
T & operator[](size_t); // do not
void f(); // do
void g(void); // do not
const int x = 7; // do
int const y = 9; // do not
const int *const p = nullptr; // do
int const *const p = nullptr; // do not