[Bug c++/109247] [13 Regression] optional<T> o; o = {x}; wants to use explicit optional(U) constructor since r13-6765-ga226590fefb35ed6
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 23 18:42:16 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109247
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=60027
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #4)
> Oops, this testcase from PR84849 might be strictly speaking invalid and GCC
> correct to reject. Is this PR not invalid for the same reason?
Indeed, this seems to be a template form of CWG1228, and thus ill-formed. But
it was accepted by GCC 9-12 and is also accepted by MSVC, EDG, and Clang, so I
wonder if the committee wants to adjust the standard to match the
implementations; I've asked.
But webkit should probably fix their code anyway, perhaps by changing
m_brush = {setPattern_pattern};
to
m_brush = Brush{setPattern_pattern};
More information about the Gcc-bugs
mailing list