diff --git a/include/boost/parser/parser.hpp b/include/boost/parser/parser.hpp index 32719e13..ab2137ad 100644 --- a/include/boost/parser/parser.hpp +++ b/include/boost/parser/parser.hpp @@ -8545,7 +8545,7 @@ namespace boost { namespace parser { template auto get_error_handler_iterator(R & r) { - if constexpr (is_token_iter_v>) { + if constexpr (is_token_iter_v>) { return detail::text::detail::begin(r).range_begin(); } else { return detail::text::detail::begin(r); @@ -9068,6 +9068,9 @@ namespace boost { namespace parser { // clang-format on #endif { + static_assert( + !detail::is_token_iter_v>, + "You cannot use a skipper when parsing tokens."); detail::attr_reset reset(attr); auto r_ = detail::make_input_subrange(r); auto first = r_.begin(); @@ -9172,6 +9175,9 @@ namespace boost { namespace parser { // clang-format on #endif { + static_assert( + !detail::is_token_iter_v>, + "You cannot use a skipper when parsing tokens."); auto r_ = detail::make_input_subrange(r); auto first = r_.begin(); auto const last = r_.end(); @@ -9396,6 +9402,9 @@ namespace boost { namespace parser { // clang-format on #endif { + static_assert( + !detail::is_token_iter_v>, + "You cannot use a skipper when parsing tokens."); auto r_ = detail::make_input_subrange(r); auto first = r_.begin(); auto const last = r_.end();