[all-commits] [llvm/llvm-project] d61601: [ADT] Make ilist_select_iterator_type a type alias...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Wed Sep 24 08:45:09 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6160137af892693a22f0864a766e4beb96f93ff
      https://github.com/llvm/llvm-project/commit/d6160137af892693a22f0864a766e4beb96f93ff
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    M llvm/include/llvm/ADT/ilist_node.h
    M llvm/include/llvm/ADT/simple_ilist.h

  Log Message:
  -----------
  [ADT] Make ilist_select_iterator_type a type alias (NFC) (#160446)

Without this patch, we have:

  template <bool use_iterator_bits, typename Opts, bool arg1, bool arg2>
  struct ilist_select_iterator_type {
    using type = ...;
  }

This means that we must reference "type" with somewhat mouthful:

  typename ilist_select_iterator_type<...>::type

This patch simplifies the reference by making
ilist_select_iterator_type a type alias.

Now, we always obtain "bool use_iterator_bit" from
OptionsT::has_iterator_bits, so this patch folds the logic into the
type alias.



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