Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/boost/spirit/home/lex/lexer/lexertl/iterator.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2001-2011 Hartmut Kaiser
// Copyright (c) 2025 Joaquin M Lopez Munoz
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -115,6 +116,19 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
? unique_functor_type::map_state(*this, statename)
: 0;
}

iterator& operator++()
{
this->base_type::operator++();
return *this;
}

iterator operator++(int)
{
iterator tmp(*this);
this->base_type::operator++();
return tmp;
}
};
}}

Expand Down
11 changes: 10 additions & 1 deletion test/support/iterator_concepts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@
// Compliance with Boost.ConceptCheck/C++20 iterator concepts

#include <boost/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/spirit/home/classic/iterator/file_iterator.hpp>
#include <boost/spirit/home/classic/iterator/fixed_size_queue.hpp>
#include <boost/spirit/home/classic/iterator/multi_pass.hpp>
#include <boost/spirit/home/classic/iterator/position_iterator.hpp>
#include <boost/spirit/home/karma/stream/ostream_iterator.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/iterator.hpp>
#include <boost/spirit/home/lex/lexer_lexertl.hpp>
#include <boost/spirit/home/support/iterators/istream_iterator.hpp>
#include <boost/spirit/home/support/iterators/line_pos_iterator.hpp>
#include <boost/spirit/home/support/iterators/look_ahead.hpp>
#include <boost/spirit/home/support/iterators/multi_pass.hpp>
#include <boost/spirit/home/support/iterators/ostream_iterator.hpp>
#include <istream>
#include <ostream>
#include <string>

template<typename F> struct unparens;
template<typename T> struct unparens<void(T)> { typedef T type; };
Expand Down Expand Up @@ -64,6 +67,12 @@ STATIC_ASSERT_FORWARD_ITERATOR((
STATIC_ASSERT_OUTPUT_ITERATOR(
(boost::spirit::karma::ostream_iterator<char, char>),
char);
STATIC_ASSERT_FORWARD_ITERATOR((
boost::spirit::lex::lexertl::lexer<
boost::spirit::lex::lexertl::token<
std::string::iterator,
boost::mpl::vector<int>,
boost::mpl::false_>>::iterator_type));
STATIC_ASSERT_FORWARD_ITERATOR((
boost::spirit::istream_iterator));
STATIC_ASSERT_FORWARD_ITERATOR((
Expand Down