bit_util: Make Replicate constexpr

This commit is contained in:
Wunkolo 2021-06-09 09:51:35 -07:00 committed by merry
parent ccf27f9c8c
commit 58ffde23f9

View file

@ -199,7 +199,7 @@ constexpr bool MostSignificantBit(T value) {
}
template<typename T>
inline T Replicate(T value, size_t element_size) {
constexpr T Replicate(T value, size_t element_size) {
ASSERT_MSG(BitSize<T>() % element_size == 0, "bitsize of T not divisible by element_size");
if (element_size == BitSize<T>())
return value;