[PATCH] D103900: [llvm] Add enum iteration to Sequence

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 02:12:06 PDT 2021


courbet added inline comments.


================
Comment at: llvm/include/llvm/ADT/Sequence.h:159
+      // This assertion forbids overflow of `PastEndValue`.
+      assert(End != std::numeric_limits<raw_type>::max() &&
+             "Forbidden End value for seq_inclusive.");
----------------
So you can't `iota_range` and enum with `uint8_t` underlying type and 256 values ? That seems a bit artificial.
Maybe we could always use `intmax_t` (resp. `uintmax_t` for unsigned underlying types) as raw_type ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103900/new/

https://reviews.llvm.org/D103900



More information about the llvm-commits mailing list