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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-11-01
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=115314
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed, seems we're incorrectly treating the dependent specialization
  constant_wrapper<(L::value - R::value)>
as if it were written
  constant_wrapper<(L::value - R::value), decltype(L::value - R::value)::type>
i.e. the defaulted template argument lacks the implicit CTAD cast to
fixed_value.

So a workaround would be to add a redundant cast in the default template
argument:
  template <fixed_value Value, typename AdlType =
decltype(fixed_value(Value))::type>
  struct constant_wrapper;

Reply via email to