#include <cstddef>
#include <type_traits>
#include <limits>
+#include <glog/logging.h>
#include <folly/Bits.h>
#include <folly/Portability.h>
template <class T, class Traits>
inline void Bits<T, Traits>::set(T* p, size_t bitStart, size_t count,
UnderlyingType value) {
- assert(count <= sizeof(UnderlyingType) * 8);
+ DCHECK_LE(count, sizeof(UnderlyingType) * 8);
size_t cut = bitsPerBlock - count;
- assert(value == (value << cut >> cut));
+ DCHECK_EQ(value, value << cut >> cut);
size_t idx = blockIndex(bitStart);
size_t offset = bitOffset(bitStart);
if (std::is_signed<UnderlyingType>::value) {
template <class T, class Traits>
inline auto Bits<T, Traits>::get(const T* p, size_t bitStart, size_t count)
-> UnderlyingType {
- assert(count <= sizeof(UnderlyingType) * 8);
+ DCHECK_LE(count, sizeof(UnderlyingType) * 8);
size_t idx = blockIndex(bitStart);
size_t offset = bitOffset(bitStart);
UnderlyingType ret;