@@ -57,7 +57,7 @@ namespace xsimd
5757#if XSIMD_HAS_BUILTIN(__builtin_popcountg)
5858 return __builtin_popcountg (x);
5959#else
60- XSIMD_IF_CONSTEXPR (sizeof (T) == 1 )
60+ if constexpr (sizeof (T) == 1 )
6161 {
6262#if XSIMD_HAS_BUILTIN(__builtin_popcount)
6363 return __builtin_popcount (x);
@@ -68,7 +68,7 @@ namespace xsimd
6868 return ((uint64_t )x * 0x200040008001ULL & 0x111111111111111ULL ) % 0xf ;
6969#endif
7070 }
71- else XSIMD_IF_CONSTEXPR (sizeof (T) == 2 )
71+ else if constexpr (sizeof (T) == 2 )
7272 {
7373#if XSIMD_HAS_BUILTIN(__builtin_popcount)
7474 return __builtin_popcount (x);
@@ -85,7 +85,7 @@ namespace xsimd
8585 + (((v & 0xfff000 ) >> 12 ) * msb12 & mask5) % 0x1f ;
8686#endif
8787 }
88- else XSIMD_IF_CONSTEXPR (sizeof (T) == 4 )
88+ else if constexpr (sizeof (T) == 4 )
8989 {
9090#if XSIMD_HAS_BUILTIN(__builtin_popcount)
9191 return __builtin_popcount (x);
@@ -132,7 +132,7 @@ namespace xsimd
132132 if (x == 0 )
133133 return sizeof (T) * CHAR_BIT ;
134134
135- XSIMD_IF_CONSTEXPR (sizeof (T) <= 4 )
135+ if constexpr (sizeof (T) <= 4 )
136136 {
137137#if XSIMD_HAS_BUILTIN(__builtin_clz)
138138 return __builtin_clz ((unsigned int )x) - (4 - sizeof (T)) * CHAR_BIT ;
@@ -144,11 +144,11 @@ namespace xsimd
144144 x |= x >> 1 ;
145145 x |= x >> 2 ;
146146 x |= x >> 4 ;
147- XSIMD_IF_CONSTEXPR (sizeof (T) >= 2 )
147+ if constexpr (sizeof (T) >= 2 )
148148 {
149149 x |= x >> 8 ;
150150 }
151- XSIMD_IF_CONSTEXPR (sizeof (T) >= 4 )
151+ if constexpr (sizeof (T) >= 4 )
152152 {
153153 x |= x >> 16 ;
154154 }
@@ -192,7 +192,7 @@ namespace xsimd
192192 if (x == 0 )
193193 return sizeof (T) * CHAR_BIT ;
194194
195- XSIMD_IF_CONSTEXPR (sizeof (T) <= 4 )
195+ if constexpr (sizeof (T) <= 4 )
196196 {
197197#if XSIMD_HAS_BUILTIN(__builtin_ctz)
198198 return __builtin_ctz ((unsigned int )x);
0 commit comments