[Bug c++/127008] `if (type a(1))` should have a better error message

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Aug 24 10:20:41 GMT 2026


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Or if it wouldn't use an explicit constructor, simply:

    if (type1 s(a))
              ^~~~
              |
              s = a


More information about the Gcc-bugs mailing list