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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nshead at gcc dot gnu.org
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |nshead at gcc dot 
gnu.org
   Target Milestone|---                         |16.0
             Status|NEW                         |RESOLVED

--- Comment #2 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
For the testcase in comment #0 we now get the following diagnostic:

/home/wreien/m/e.cpp: In function ‘int main()’:
/home/wreien/m/e.cpp:6:11: error: conversion from ‘int’ to non-scalar type ‘C’
requested
    6 |     C c = 42;
      |           ^~
/home/wreien/m/e.cpp:2:14: note: explicit conversion function was not
considered
    2 |     explicit C(int);
      |              ^

The particular error message here I think can still be slightly improved for
clarity but at least now is pointing out the explicit constructor, so closing
as fixed.

Reply via email to