Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADT] Backport std::to_underlying from C++23 (llvm#70681)
This patch backports a one-liner `std::to_underlying` that came with C++23. This is useful for refactoring unscoped enums into scoped enums, because the latter are not implicitly convertible to integer types. I followed libc++ implementation, but I consider their testing too heavy for us, so I wrote a simpler set of tests.
- Loading branch information