Skip to content

Commit

Permalink
Fix for C++11 constexpr function
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed Nov 12, 2024
1 parent 2166805 commit 1ed73f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/genesis/utils/math/bit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace utils {
*/
template <typename T>
inline
#if defined(__cpp_lib_bitops) || defined(GENESIS_HAS_BUILTIN_POPCOUNT)
#if GENESIS_CPP_STD >= GENESIS_CPP_STD_14 && ( defined(__cpp_lib_bitops) || defined(GENESIS_HAS_BUILTIN_POPCOUNT) )
constexpr
#endif
typename std::enable_if<std::is_unsigned<T>::value, uint64_t>::type
Expand All @@ -93,7 +93,6 @@ pop_count( T n )
} else {
return __builtin_popcountll( static_cast<unsigned long long>( n ));
}
return 0;

#else

Expand Down

0 comments on commit 1ed73f4

Please sign in to comment.