[llvm] [ADT] Backport std::to_underlying from C++23 (PR #70681)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 11:33:31 PDT 2023


kuhar wrote:

> > I'd land it together, otherwise this change has no uses in the codebase. And the change is very simple.
> 
> This is driven by my work on Clang enums, so I intentionally factored this PR out so that this useful facility is not tied to any particular usage (that might get reverted). I'm going to commit several NFC patches tomorrow that use this.

The clang part makes sense to me, but the other usage seems to have exactly the same API and implementation and should be completely safe to replace.

https://github.com/llvm/llvm-project/pull/70681


More information about the llvm-commits mailing list