Skip to content

Commit 058e1bf

Browse files
committed
Merge pull request isocpp#98 from octoploid/syntax-fix
Fix syntax error in Rc-in-class-initializer
2 parents 257aa9d + cc74732 commit 058e1bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3741,7 +3741,7 @@ Setting a `Vector1` to empty after detecting an error is trivial.
37413741
int j;
37423742
public:
37433743
X() :i{666}, s{"qqq"} { } // j is uninitialized
3744-
X(int i) :i{ii} {} // s is "" and j is uninitialized
3744+
X(int ii) :i{ii} {} // s is "" and j is uninitialized
37453745
// ...
37463746
};
37473747

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

0 commit comments

Comments
 (0)