bitwise: prefer template SFINAE over param SFINAE
This commit is contained in:
parent
d3c5af6fdf
commit
1c814c02d2
@ -76,9 +76,14 @@ namespace cruft {
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
template <
|
||||
typename T,
|
||||
typename = std::enable_if_t<
|
||||
std::is_integral_v<T>
|
||||
>
|
||||
>
|
||||
constexpr T
|
||||
popcount (std::enable_if_t<std::is_integral<T>::value,T> t)
|
||||
popcount (T t)
|
||||
{
|
||||
return __builtin_popcount (t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user