[all-commits] [llvm/llvm-project] 1ee6a1: [libc] fix -Wshift-count-overflow in UInt.h (#74649)

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Thu Dec 7 08:20:59 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ee6a1e38aa0c3773d892fcd01bb2af8e446e67f
      https://github.com/llvm/llvm-project/commit/1ee6a1e38aa0c3773d892fcd01bb2af8e446e67f
  Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
  Date:   2023-12-07 (Thu, 07 Dec 2023)

  Changed paths:
    M libc/src/__support/UInt.h

  Log Message:
  -----------
  [libc] fix -Wshift-count-overflow in UInt.h (#74649)

Not that I'm very good at SFINAE, but it seems that conversion operators
are
perhaps difficult to compose with SFINAE. I saw an example that used one
layer
of indirection to have an explicit return type that could then be used
with
enable_if_t.

Link: https://stackoverflow.com/a/7604580
Fixes: #74623




More information about the All-commits mailing list