[all-commits] [llvm/llvm-project] af1f06: [libc++] Refactor key extraction for __hash_table ...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Tue Aug 26 07:27:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af1f06e41b05c267480f1629dc0fcdf18f3b59f6
      https://github.com/llvm/llvm-project/commit/af1f06e41b05c267480f1629dc0fcdf18f3b59f6
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2025-08-26 (Tue, 26 Aug 2025)

  Changed paths:
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__fwd/tuple.h
    M libcxx/include/__hash_table
    M libcxx/include/__tree
    R libcxx/include/__type_traits/can_extract_key.h
    A libcxx/include/__utility/try_key_extraction.h
    M libcxx/include/map
    M libcxx/include/module.modulemap.in
    M libcxx/include/set
    M libcxx/include/tuple
    M libcxx/include/unordered_map
    M libcxx/test/std/containers/associative/multiset/emplace.pass.cpp
    M libcxx/test/std/containers/associative/set/emplace.pass.cpp
    M libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp
    M libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp

  Log Message:
  -----------
  [libc++] Refactor key extraction for __hash_table and __tree (#154512)

This patch replaces `__can_extract_key` with an overload set to try to
extract the key. This simplifies the code, since we don't need to have
separate overload sets for the unordered and associative containers. It
also allows extending the set of extraction cases more easily, since we
have a single place to define how the key is extracted.



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