Skip to content

Commit fb07ac2

Browse files
committed
Updated the comments in common-byval.h to reference both the rule of
five and the rule of zero, as well as removed "= default" from the five special member functions.
1 parent 04fa34f commit fb07ac2

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

latex/headers/common-byval.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,25 @@ class T {
1919
...
2020

2121
public:
22-
// Rule of Zero: the following five special member functions should not be explicitly declared
22+
// If any of the following five special member functions are not
23+
24+
// public, inline or defaulted, then all five of them should be
25+
26+
// explicitly declared (see rule of five).
27+
28+
// Otherwise, none of them should be explicitly declared
29+
30+
// (see rule of zero).
2331

24-
// T(const T &rhs) = default;
32+
// T(const T &rhs);
2533

26-
// T(T &&rhs) = default;
34+
// T(T &&rhs);
2735

28-
// T &operator=(const T &rhs) = default;
36+
// T &operator=(const T &rhs);
2937

30-
// T &operator=(T &&rhs) = default;
38+
// T &operator=(T &&rhs);
3139

32-
// ~T() = default;
40+
// ~T();
3341

3442
...
3543

0 commit comments

Comments
 (0)