Skip to content

Commit

Permalink
Fix detail::make_input_view()'s handling of pointers-as-ranges.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzlaine committed Sep 9, 2020
1 parent 19d4417 commit f23c864
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/boost/parser/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1978,11 +1978,10 @@ namespace boost { namespace parser {
template<typename R>
constexpr auto make_input_view(R && r) noexcept
{
if constexpr (non_unicode_char_range_like<R>) {
if constexpr (utf8_pointer<R>) {
if constexpr (non_unicode_char_range_like<std::remove_cvref_t<R>>) {
if constexpr (utf8_pointer<std::remove_cvref_t<R>>) {
return parser::make_view(r, text::null_sentinel{});
} else if constexpr (std::is_array_v<
std::remove_reference_t<R>>) {
} else if constexpr (std::is_array_v<std::remove_cvref_t<R>>) {
auto first = std::begin(r);
auto last = std::end(r);
if (first != last && *std::prev(last) == 0)
Expand Down

0 comments on commit f23c864

Please sign in to comment.