[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 06:14:07 PDT 2025
eaeltsin wrote:
Sorry, I over-generalized :)
Here is the proper sample:
```
template< typename T, T N >
struct IC
{
static const T next_value = static_cast<T>(N + 1);
typedef IC< T, next_value > next;
};
enum E
{
integral_to_integral,
integral_to_float,
float_to_integral,
float_to_float
};
IC<E, float_to_float> foo;
```
https://github.com/llvm/llvm-project/pull/143034
More information about the cfe-commits
mailing list