Skip to content

Commit ae2659f

Browse files
committed
Fix tombstone_traits for new bounded::integer representation.
1 parent 7905ce8 commit ae2659f

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

source/bounded/test/tombstone.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,25 +97,20 @@ constexpr auto reversible(auto const ... indexes) {
9797
static_assert(bounded::tombstone_traits<bounded::integer<0, 4>>::spare_representations == 251_bi);
9898

9999
static_assert(reversible<bounded::integer<0, 4>>(
100-
pair(0_bi, 5_bi),
101-
pair(1_bi, 6_bi),
102-
pair(2_bi, 7_bi),
103-
pair(3_bi, 8_bi),
104-
pair(4_bi, 9_bi),
105-
pair(5_bi, 10_bi),
106-
pair(250_bi, 255_bi)
100+
pair(0_bi, -128_bi),
101+
pair(1_bi, -127_bi),
102+
pair(128_bi, 5_bi),
103+
pair(250_bi, 127_bi)
107104
));
108105

109106
static_assert(bounded::tombstone_traits<bounded::integer<2, 5>>::spare_representations == 252_bi);
110107

111108
static_assert(reversible<bounded::integer<2, 5>>(
112-
pair(0_bi, 0_bi),
113-
pair(1_bi, 1_bi),
114-
pair(2_bi, 6_bi),
115-
pair(3_bi, 7_bi),
116-
pair(4_bi, 8_bi),
117-
pair(5_bi, 9_bi),
118-
pair(251_bi, 255_bi)
109+
pair(0_bi, -128_bi),
110+
pair(1_bi, -127_bi),
111+
pair(129_bi, 1_bi),
112+
pair(130_bi, 6_bi),
113+
pair(251_bi, 127_bi)
119114
));
120115

121116
static_assert(bounded::tombstone_traits<bounded::integer<254, 255>>::spare_representations == 254_bi);

0 commit comments

Comments
 (0)