You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code fails with both static assertion indicating that enum_fuse does not work as expected:
If you uncomment the assertions you see that both value1 and value2 evaluate to 4;
Expected behavior: enum_fuse generates distinct values for every combination of input parameters
Actual behavior: enum_fuse sometimes returns the identical values
Ok, likely the shift value is slightly miscalculated.
log2(enum_count<E>() + 1)) returns 2 (instead of 3) e.g. for enum of size 5 and 6.
So I suggest to use $log_2(2*count - 1)$. log2((enum_count<E>() << 1) - 1))
instead
Hi,
The following code fails with both static assertion indicating that enum_fuse does not work as expected:
If you uncomment the assertions you see that both value1 and value2 evaluate to 4;
Expected behavior: enum_fuse generates distinct values for every combination of input parameters
Actual behavior: enum_fuse sometimes returns the identical values
Seen on latest master and on v0.9.6
https://godbolt.org/z/PP5v76Pdq
CMakeLists.txt for minimal example
The text was updated successfully, but these errors were encountered: