Remove use of boost::find_first_of

Getting a constexpr related error on old versions of gcc, so for compatibility,
just use string_view's find_first_of instead.
This commit is contained in:
Daniel James 2017-12-30 17:51:34 +00:00
parent 21c2bf2b95
commit 92053837ca

View File

@ -8,8 +8,6 @@
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#include <boost/range/algorithm/find_first_of.hpp>
#include <boost/range/as_literal.hpp>
#include <boost/spirit/include/classic_attribute.hpp>
#include <boost/spirit/include/classic_chset.hpp>
#include <boost/spirit/include/classic_core.hpp>
@ -1158,14 +1156,13 @@ namespace quickbook
{
string_iterator first = first_.base();
string_iterator last = last_.base();
string_iterator mark_pos = boost::find_first_of(
boost::make_iterator_range(first, last), boost::as_literal("#*"));
auto mark_pos = string_view(first, last - first).find_first_of("*#");
if (mark_pos == last) {
if (mark_pos == string_view::npos) {
plain_block(first, last);
}
else {
list_block(first, mark_pos, last);
list_block(first, first + mark_pos, last);
}
}