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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-09-30
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The reason I added overloads for floating-point types is that they can be
converted to integral types. But if you read "is convertible to **an** integral
type" as meaning unambiguously convertible to exactly one integral type, then
that's not true for FP types.

I did add tests for PR 87982 that FP types can be used, but I don't think there
were any pre-existing tests, and maybe nobody needs that.

I could retain support for real FP types, but reject your testcase, like this:

  constexpr long long
  __size_to_integer(floating_point auto __n) { return (long long)__n; }

But maybe I should just drop the FP overloads.

Reply via email to