Description
We currently have several different styles of indenting class template definitions. Usually, every "structural" line break causes an extra indent level, like we have in synopses:
namespace std {
template <typename T>
class foo;
}
But when it comes to definitions, we sometimes follow this convention and othertimes we violate it:
-
"No linebreak after
template
":namespace std { template <typename T> class foo { public: void bar(); }; }
-
"linebreak and indent":
namespace std { template <typename T> class foo { public: void bar(); }; }
-
"linebreak with no indent":
namespace std { template <typename T> class foo { public: void bar(); }; }
Of these three options, (1) and (2) seem the most consistent. Option (1) is not always feasible when the template parameter list is long. However, option (3) is used a lot, especially in the older parts of the text (e.g. [containers]).
For now, I will probably retain the local style, though if I need to add missing namespace std {
s and the indentation changes, I might as well remove instances of (3). But it would be good to decide on a definite style and record that in the wiki. (My vote would be to allow only (1) and (2).)