Re P1682R1 "std::to_underlying for enumerations":

One thing to be aware of here is ADL.
The Standard Library has historically been at least a tiny bit careful (though not as careful as I'd prefer) to avoid adding "greedy" templates that collide with plausible user names.
However, in the specific case of functions taking only enum types, I think you're in the clear — because the associated namespaces for nested enum types do not include the kitchen sink! For example, A<B>::E is associated only with A, never with B or even with the base classes of A.
Here's my most valiant effort to make ADL break your proposal... and my effort failed: https://godbolt.org/z/8_Rix-

–Arthur