diff --git a/test/view/tokenize.cpp b/test/view/tokenize.cpp index b36d834ff..b16a166b6 100644 --- a/test/view/tokenize.cpp +++ b/test/view/tokenize.cpp @@ -4,6 +4,16 @@ #include "../simple_test.hpp" #include "../test_utils.hpp" +template +void test_forward(std::false_type) +{} + +template +void test_forward(std::true_type) +{ + CPP_assert(ranges::forward_range); +} + int main() { using namespace ranges; @@ -22,12 +32,14 @@ int main() ::has_type&>(*ranges::begin(crng)); CPP_assert(common_range); - CPP_assert(forward_range); + const bool is_bidi = bidirectional_iterator>; + test_forward(std::integral_constant{}); CPP_assert(!bidirectional_range); CPP_assert(!sized_range); CPP_assert(common_range); - CPP_assert(forward_range); + const bool const_is_bidi = bidirectional_iterator>; + test_forward(std::integral_constant{}); CPP_assert(!bidirectional_range); CPP_assert(!sized_range);