Lines Matching refs:SetBits
39 struct SetBits { struct
42 const static T get = (T(1) << First) | SetBits<T, First + 1, Num - 1>::get; argument
46 struct SetBits<T, Last, 0> {
51 static_assert(SetBits<uint32_t, 0, 0>::get == uint32_t(0x00000000),
53 static_assert(SetBits<uint32_t, 0, 1>::get == uint32_t(0x00000001),
55 static_assert(SetBits<uint32_t, 31, 1>::get == uint32_t(0x80000000),
57 static_assert(SetBits<uint32_t, 1, 2>::get == uint32_t(0x00000006),
59 static_assert(SetBits<uint32_t, 30, 2>::get == uint32_t(0xc0000000),
61 static_assert(SetBits<uint32_t, 0, 31>::get == uint32_t(0x7FFFFFFF),
63 static_assert(SetBits<uint32_t, 0, 32>::get == uint32_t(0xFFFFFFFF),
65 static_assert(SetBits<uint32_t, 16, 16>::get == uint32_t(0xFFFF0000),
68 static_assert(SetBits<uint64_t, 0, 1>::get == uint64_t(0x0000000000000001LL),
70 static_assert(SetBits<uint64_t, 63, 1>::get == uint64_t(0x8000000000000000LL),
72 static_assert(SetBits<uint64_t, 62, 2>::get == uint64_t(0xc000000000000000LL),
74 static_assert(SetBits<uint64_t, 31, 1>::get == uint64_t(0x0000000080000000LL),
76 static_assert(SetBits<uint64_t, 16, 16>::get == uint64_t(0x00000000FFFF0000LL),