Skip to content

Commit d829eac

Browse files
committed
[class.inhctor.init] Fix explanation of "error:" in example
The correct explanation is that classes `B1` and `D1` do not have default constructors, not that they have deleted default constructors. Fixes NB CA 062 (C++23 CD).
1 parent 608c152 commit d829eac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/classes.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,15 +5875,15 @@
58755875
D1 d(2, 3, 4); // OK, \tcode{B1} is initialized by calling \tcode{B1(2, 3, 4)},
58765876
// then \tcode{d.x} is default-initialized (no initialization is performed),
58775877
// then \tcode{d.y} is initialized by calling \tcode{get()}
5878-
D1 e; // error: \tcode{D1} has a deleted default constructor
5878+
D1 e; // error: \tcode{D1} has no default constructor
58795879
}
58805880

58815881
struct D2 : B2 {
58825882
using B2::B2;
58835883
B1 b;
58845884
};
58855885

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

58885888
struct W { W(int); };
58895889
struct X : virtual W { using W::W; X() = delete; };

0 commit comments

Comments
 (0)