C++ Logo

std-discussion

Advanced search

Re: Attributes of inherited constructors

From: Stephan Bergmann <sberg.fun_at_[hidden]>
Date: Thu, 22 May 2025 13:41:37 +0200
On 5/22/25 13:33, Jens Maurer wrote:
> On 22/05/2025 12.50, Stephan Bergmann via Std-Discussion wrote:
>>> D d3(0); // - (+) -
>>> D d4(0); // - - -
>
> What's the difference between those two?
> They seem identical.

Yeah, it's just to demonstrate that some compilers (and even only
somewhat indirectly, "<source>:19:11: note: synthesized method
'D::D(int) [inherited from B]' first required here") only warn about the
first such declaration, but not later ones.

Received on 2025-05-22 11:41:40