From 1c814c02d27387d35a60474fb67df003fdd5ba4b Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 7 Aug 2018 16:58:02 +1000 Subject: [PATCH] bitwise: prefer template SFINAE over param SFINAE --- bitwise.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bitwise.hpp b/bitwise.hpp index fc83809a..71a82eae 100644 --- a/bitwise.hpp +++ b/bitwise.hpp @@ -76,9 +76,14 @@ namespace cruft { /////////////////////////////////////////////////////////////////////////// - template + template < + typename T, + typename = std::enable_if_t< + std::is_integral_v + > + > constexpr T - popcount (std::enable_if_t::value,T> t) + popcount (T t) { return __builtin_popcount (t); }