4 ms·
https://godbolt.org/g/XKAZOb https://godbolt.org/g/XKAZOb fixes the bugs in the sample code in the parent post. If you compile with -O2 then iota_sum_const_all
by tjalfi 10y ago
https://godbolt.org/g/XKAZOb https://godbolt.org/g/XKAZOb fixes the bugs in the sample code in the parent post.
If you compile with -O2 then iota_sum_const_alloca and iota_sum_array are both evaluated at compile time.