Skip to content
Unverified Commit d0caa4ee authored by Vlad Serebrennikov's avatar Vlad Serebrennikov Committed by GitHub
Browse files

[ADT] Backport std::to_underlying from C++23 (#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.
parent 134c9159
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment