Skip to content
Open
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 @@ -5987,7 +5987,7 @@ How would a maintainer know whether `j` was deliberately uninitialized (probably
class X2 {
int i {666};
string s {"qqq"};
int j {0};
int j {numeric_limits<int>::min()};
public:
X2() = default; // all members are initialized to their defaults
X2(int ii) :i{ii} {} // s and j initialized to their defaults
Expand All @@ -6001,7 +6001,7 @@ How would a maintainer know whether `j` was deliberately uninitialized (probably
string s;
int j;
public:
X3(int ii = 666, const string& ss = "qqq", int jj = 0)
X3(int ii = 666, const string& ss = "qqq", int jj = numeric_limits<int>::min())
:i{ii}, s{ss}, j{jj} { } // all members are initialized to their defaults
// ...
};
Expand Down