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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Summary|GCC does not allow calling  |GCC does not allow calling
                   |of overloaded private type  |of overloaded private
                   |conversion operator in      |implicit type conversion
                   |default argument field of   |operator in default
                   |friend function             |argument field of friend
                   |                            |function
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-01-10

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. If the cast is explicit either using C style casts or a static_cast,
it works.

That is:
void friend_set(int i=static_cast<int>(X())){}


works.

Reply via email to