bit_util: Bit<T>(size_t, const T) cannot be constexpr

Compound statements are not permitted in constexpr functions in C++14
This commit is contained in:
MerryMage 2016-12-29 10:08:35 +00:00
parent d5610eb26c
commit 0d1fa85402

View file

@ -50,7 +50,7 @@ constexpr bool Bit(const T value) {
/// Extracts a single bit at bit_position from value of type T.
template<typename T>
constexpr bool Bit(size_t bit_position, const T value) {
inline bool Bit(size_t bit_position, const T value) {
ASSERT_MSG(bit_position < BitSize<T>(), "bit_position must be smaller than size of T");
return ((value >> bit_position) & 1) != 0;