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

            Bug ID: 107799
           Summary: Wrong return type for std::bit_width
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: diego at baldassar dot net
  Target Milestone: ---

According to the C++20 standard, std::bit_width returns an int; in libstdc++ it
returns the same type as the argument.

The return type should probably be _If_is_unsigned_integer<_Tp, int> instead of
_If_is_unsigned_integer<_Tp>.

Reply via email to