Skip to content

Commit

Permalink
Use proper return type
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco authored Feb 26, 2025
1 parent fc0e646 commit bacdd2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcudacxx/include/cuda/std/__bit/integral.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr int bit_width(_Tp __t) noexc
// if __t == 0, __bit_log2(0) returns 0xFFFFFFFF. Since unsigned overflow is well-defined, the result is -1 + 1 = 0
auto __ret = _CUDA_VSTD::__bit_log2(__t) + 1;
_CCCL_BUILTIN_ASSUME(__ret <= numeric_limits<_Tp>::digits);
return __ret;
return static_cast<int>(__ret);
}

_CCCL_TEMPLATE(class _Tp)
Expand Down

0 comments on commit bacdd2b

Please sign in to comment.