1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add C++14 version is_signed, is_unsigned

This commit is contained in:
bolero-MURAKAMI 2015-03-31 20:05:32 +09:00
parent b51e338b68
commit ead65bf7fd
79 changed files with 310 additions and 114 deletions

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
namespace sprout {
namespace detail {
@ -29,7 +30,7 @@ namespace sprout {
# endif
template<typename T>
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_unsigned<T>::value,
sprout::is_unsigned<T>::value,
int
>::type
popcount(T n) {
@ -39,7 +40,7 @@ namespace sprout {
}
template<typename T>
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_signed<T>::value,
sprout::is_signed<T>::value,
int
>::type
popcount(T n) {