C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Is a default ctor struct C{C(); }; also a converting constructor

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Tue, 9 Jan 2024 18:44:42 +0100
On 09/01/2024 18:33, connor horman via Std-Proposals wrote:
> You can copy-list-initialize from `{}` if you have a non-explicit
> default constructor. You thus convert from the empty initializer list to
> C. Thus, I would call this a converting constructor.

The wording in question has been added by

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0398r0.html

Cf. the core issue:

https://cplusplus.github.io/CWG/issues/1518.html

Thank you,
-- 
Giuseppe D'Angelo

Received on 2024-01-09 17:44:45