From 0d1fa85402e467438b41d6281eb4d47e88771172 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Thu, 29 Dec 2016 10:08:35 +0000 Subject: [PATCH] bit_util: Bit(size_t, const T) cannot be constexpr Compound statements are not permitted in constexpr functions in C++14 --- src/common/bit_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bit_util.h b/src/common/bit_util.h index e7ec95b1..0d59f416 100644 --- a/src/common/bit_util.h +++ b/src/common/bit_util.h @@ -50,7 +50,7 @@ constexpr bool Bit(const T value) { /// Extracts a single bit at bit_position from value of type T. template -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(), "bit_position must be smaller than size of T"); return ((value >> bit_position) & 1) != 0;