Lines Matching refs:SetBits
50 struct SetBits { struct
53 const static T get = (T(1) << First) | SetBits<T, First + 1, Num - 1>::get; argument
57 struct SetBits<T, Last, 0> {
67 static_assert(SetBits<uint32_t, 0, 0>::get == uint32_t(0x00000000),
69 static_assert(SetBits<uint32_t, 0, 1>::get == uint32_t(0x00000001),
71 static_assert(SetBits<uint32_t, 31, 1>::get == uint32_t(0x80000000),
73 static_assert(SetBits<uint32_t, 1, 2>::get == uint32_t(0x00000006),
75 static_assert(SetBits<uint32_t, 30, 2>::get == uint32_t(0xc0000000),
77 static_assert(SetBits<uint32_t, 0, 31>::get == uint32_t(0x7FFFFFFF),
79 static_assert(SetBits<uint32_t, 0, 32>::get == uint32_t(0xFFFFFFFF),
81 static_assert(SetBits<uint32_t, 16, 16>::get == uint32_t(0xFFFF0000),
84 static_assert(SetBits<uint64_t, 0, 1>::get == uint64_t(0x0000000000000001LL),
86 static_assert(SetBits<uint64_t, 63, 1>::get == uint64_t(0x8000000000000000LL),
88 static_assert(SetBits<uint64_t, 62, 2>::get == uint64_t(0xc000000000000000LL),
90 static_assert(SetBits<uint64_t, 31, 1>::get == uint64_t(0x0000000080000000LL),
92 static_assert(SetBits<uint64_t, 16, 16>::get == uint64_t(0x00000000FFFF0000LL),