[all-commits] [llvm/llvm-project] 99334f: [ADT] Add static_assert to llvm::to_address for fu...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Wed Nov 5 08:41:34 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99334f74ae1cd57634c87975e32c797bed3865ce
      https://github.com/llvm/llvm-project/commit/99334f74ae1cd57634c87975e32c797bed3865ce
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-11-05 (Wed, 05 Nov 2025)

  Changed paths:
    M llvm/include/llvm/ADT/STLForwardCompat.h

  Log Message:
  -----------
  [ADT] Add static_assert to llvm::to_address for function types (#166505)

This patch aligns llvm::to_address with C++20 std::to_address by
adding a static_assert to prevent instantiation with function types.
The C++20 standard says that std::to_address is ill-formed on a
function type.



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