| Index: src/utils.h
|
| diff --git a/src/utils.h b/src/utils.h
|
| index 115f7847584d07d7b476131dc44de4181e14ba61..8acb6d4775d6cc011387cb1e50cfcf7a1e1d3e99 100644
|
| --- a/src/utils.h
|
| +++ b/src/utils.h
|
| @@ -233,6 +233,25 @@ inline int32_t WhichPowerOf2Abs(int32_t x) {
|
| }
|
|
|
|
|
| +// Obtains the unsigned type corresponding to T
|
| +// available in C++11 as std::make_unsigned
|
| +template<typename T>
|
| +struct make_unsigned {
|
| + typedef T type;
|
| +};
|
| +
|
| +
|
| +// Template specializations necessary to have make_unsigned work
|
| +template<> struct make_unsigned<int32_t> {
|
| + typedef uint32_t type;
|
| +};
|
| +
|
| +
|
| +template<> struct make_unsigned<int64_t> {
|
| + typedef uint64_t type;
|
| +};
|
| +
|
| +
|
| // ----------------------------------------------------------------------------
|
| // BitField is a help template for encoding and decode bitfield with
|
| // unsigned content.
|
|
|