diff --git a/examples/src/switch.cpp b/examples/src/switch.cpp index 20aecee..161c061 100644 --- a/examples/src/switch.cpp +++ b/examples/src/switch.cpp @@ -27,4 +27,18 @@ auto main() -> int { }); return response; }() == 3); + static_assert([] { + int response{}; + utempl::Switch( + utempl::Tuple{2, 1, 0}, + utempl::Tuple{0, 1, 2}, + 3, + [&](int value) { + response = value + 1; + }, + [&] { + response = 3; + }); + return response; + }() == 3); };