Open mglisse opened 6 years ago
Adding || boost::is_enum<V>::value
in the constructor of number let me move forward with the testing, but that might not be a good way to handle it.
It's as good a way as any, but I'm quite conflicted about this, consider:
enum { big1 = -2, big2 = ULLONG_MAX, };
What should happen when we assign from big1
and big2
?
I would expect the same behavior when interoperating with an enum E
or its std::underlying_type_t<E>
. If that's __int128
... well, I seem to get a compile error currently with __int128
, so the same looks fine for the enum. But I haven't thought about it much, we only use very small enums in this project.
fails to compile, while it works for
cpp_rational
. (In my application, it is actuallyq == e
that failed to compile, but I assume that is the same issue)