https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85461
--- Comment #3 from Andrew Pinski ---
Using constexpr is a decent workaround.
Note enum version of this is rejected by all compilers:
template
struct bitWidthHolding {
enum {width = (v == 0) ? 0 : bitWidthHolding<(v>>1)>::width + 1};
};
int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85461
Jonathan Wakely changed:
What|Removed |Added
Keywords||rejects-valid
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85461
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1