Skip to content

Commit cfd8efc

Browse files
committed
Improve tests for visiting multiple variants
1 parent 169652c commit cfd8efc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/tv/test/visit.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ static_assert(tv::visit(
158158
)
159159
));
160160

161+
static_assert(tv::visit(
162+
variant<2>(0_bi),
163+
variant<2>(1_bi),
164+
variant<3>(2_bi),
165+
[](bounded::integer<0, 1> const x0, bounded::integer<0, 1> const x1, bounded::integer<0, 2> const x2) {
166+
return x0 == 0_bi and x1 == 1_bi and x2 == 2_bi;
167+
}
168+
));
169+
161170
template<int max>
162171
constexpr auto function = [](bounded::integer<0, max - 1> x) {
163172
return x + 1_bi;

0 commit comments

Comments
 (0)