https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86135

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Sabetay Toros from comment #4)
> If it is not a bug then why the parenthesis version is working.

Because the rules for direct-initialization (with parentheses) and
list-initialization (with braces) are different. Different rules means
different things happen.

> Moreover Strastroup advice is to use  the initializer list version in
> constructing objects not the parenthesis.

That's not always good advice.

> Besides Clang does not suffer with that kind of error.  Both styles are
> working.

Clang does not follow the standard correctly in this respect.

Reply via email to