My personal preference is for the style we are predominantly using, because it visually separates the constructor parameter list from the initializer list, which can help in some cases:
The downside of the predominant style is that it introduces a special formatting rule (normally we would break the line after a special symbol, not before it).
My personal preference is for the style we are predominantly using, because it visually separates the constructor parameter list from the initializer list, which can help in some cases:
===== Approved style =====
class C( :shared_ ptr<int> const& a_pointer, :shared_ ptr<int> const& a_pointer, :shared_ ptr<int> const& a_pointer) : a_pointer} , b_pointer} , c_pointer}
std:
std:
std:
a_pointer{
b_pointer{
c_pointer{
{
}
===== Predominant style =====
class C( :shared_ ptr<int> const& a_pointer, :shared_ ptr<int> const& a_pointer, :shared_ ptr<int> const& a_pointer) a_pointer} , pointer{ b_pointer} , pointer{ c_pointer}
std:
std:
std:
: a_pointer{
b_
c_
{
}
In case the comment formatting is messed up, take a look at http:// paste.ubuntu. com/10990296/
The downside of the predominant style is that it introduces a special formatting rule (normally we would break the line after a special symbol, not before it).