Skip to content

Fix syntax error in Rc-in-class-initializer #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -3741,7 +3741,7 @@ Setting a `Vector1` to empty after detecting an error is trivial.
int j;
public:
X() :i{666}, s{"qqq"} { } // j is uninitialized
X(int i) :i{ii} {} // s is "" and j is uninitialized
X(int ii) :i{ii} {} // s is "" and j is uninitialized
// ...
};

Expand All @@ -3755,7 +3755,7 @@ How would a maintainer know whether `j` was deliberately uninitialized (probably
int j {0};
public:
X2() = default; // all members are initialized to their defaults
X2(int i) :i{ii} {} // s and j initialized to their defaults
X2(int ii) :i{ii} {} // s and j initialized to their defaults
// ...
};

Expand Down