mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
This was previously done via parameter expansion. The expanded form looks like this: A(128) && A(127) && ... && A(X) && ... && A(0) where A(X) is the actual range_max which is crafted to return 'false'. Static analysis detects that expressions after A(X) are dead code due to short-circuiting. The new implementation uses a simple loop to find the extrema, similarly to the loop in detail::values(). Furthermore, it uses only one parameter expansion (for reflected_set_v), as opposed to two (one for range_min and one for range_max). |
||
|---|---|---|
| .. | ||
| magic_enum.hpp | ||