Skip to content

Commit 9ff5696

Browse files
committed
[class.inhctor.init] Fix typo in example.
1 parent 1a8c2e9 commit 9ff5696

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/special.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,15 +2064,15 @@
20642064
D1 d(2, 3, 4); // OK: \tcode{B1} is initialized by calling \tcode{B1(2, 3, 4)},
20652065
// then \tcode{d.x} is default-initialized (no initialization is performed),
20662066
// then \tcode{d.y} is initialized by calling \tcode{get()}
2067-
D1 e; // error: \tcode{D1} has no default constructor
2067+
D1 e; // error: \tcode{D1} has a deleted default constructor
20682068
}
20692069

20702070
struct D2 : B2 {
20712071
using B2::B2;
20722072
B1 b;
20732073
};
20742074

2075-
D2 f(1.0); // error: \tcode{B1} has no default constructor
2075+
D2 f(1.0); // error: \tcode{B1} has a deleted default constructor
20762076

20772077
struct W { W(int); };
20782078
struct X : virtual W { using W::W; X() = delete; };
@@ -2121,7 +2121,7 @@
21212121
struct M { M(); M(int); };
21222122
struct N : M { using M::M; };
21232123
struct O : M {};
2124-
struct P : N, O {};
2124+
struct P : N, O { using N::N; using O::O; };
21252125
P p(0); // OK: use \tcode{M(0)} to initialize \tcode{N}{'s} base class,
21262126
// use \tcode{M()} to initialize \tcode{O}{'s} base class
21272127
\end{codeblock}

0 commit comments

Comments
 (0)