[all-commits] [llvm/llvm-project] d301b5: [libc++][NFC] Add a static assertion to document a...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Nov 1 09:58:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d301b59b7b4582b0119281308e86b7c0b3f77a54
      https://github.com/llvm/llvm-project/commit/d301b59b7b4582b0119281308e86b7c0b3f77a54
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-11-01 (Fri, 01 Nov 2024)

  Changed paths:
    M libcxx/include/__functional/hash.h

  Log Message:
  -----------
  [libc++][NFC] Add a static assertion to document an assumption in std::hash (#114440)

The implementation of std::hash for unsigned long makes the (correct)
assumption that size_t is at least as large as unsigned long. If that
were not the case on a platform, the implementation of std::hash for
unsigned long would be absolutely terrible. Add a static assertion to
document that assumption.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list