update boost on linux
This commit is contained in:
@@ -20,13 +20,13 @@ namespace boost { namespace spirit { namespace iterator_policies
|
||||
// thrown by buf_id_check CheckingPolicy if an instance of an iterator is
|
||||
// used after another one has invalidated the queue
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
class illegal_backtracking : public std::exception
|
||||
class BOOST_SYMBOL_VISIBLE illegal_backtracking : public std::exception
|
||||
{
|
||||
public:
|
||||
illegal_backtracking() throw() {}
|
||||
~illegal_backtracking() throw() {}
|
||||
illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
~illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
char const* what() const throw()
|
||||
char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "boost::spirit::multi_pass::illegal_backtracking";
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp>
|
||||
#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp>
|
||||
#include <boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp>
|
||||
#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
|
||||
#include <boost/assert.hpp>
|
||||
#include <iterator> // for std::iterator_traits
|
||||
|
||||
namespace boost { namespace spirit { namespace iterator_policies
|
||||
{
|
||||
@@ -35,18 +35,18 @@ namespace boost { namespace spirit { namespace iterator_policies
|
||||
{
|
||||
private:
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::value_type
|
||||
typename std::iterator_traits<T>::value_type
|
||||
result_type;
|
||||
|
||||
public:
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::difference_type
|
||||
typename std::iterator_traits<T>::difference_type
|
||||
difference_type;
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::difference_type
|
||||
typename std::iterator_traits<T>::difference_type
|
||||
distance_type;
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::pointer
|
||||
typename std::iterator_traits<T>::pointer
|
||||
pointer;
|
||||
typedef result_type& reference;
|
||||
typedef result_type value_type;
|
||||
@@ -96,7 +96,7 @@ namespace boost { namespace spirit { namespace iterator_policies
|
||||
struct shared
|
||||
{
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::value_type
|
||||
typename std::iterator_traits<T>::value_type
|
||||
result_type;
|
||||
|
||||
explicit shared(T const& input)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp>
|
||||
#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp>
|
||||
#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
|
||||
#include <boost/assert.hpp>
|
||||
#include <iterator> // for std::iterator_traits
|
||||
|
||||
namespace boost { namespace spirit { namespace iterator_policies
|
||||
{
|
||||
@@ -38,21 +38,21 @@ namespace boost { namespace spirit { namespace iterator_policies
|
||||
{
|
||||
private:
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::value_type
|
||||
typename std::iterator_traits<T>::value_type
|
||||
result_type;
|
||||
|
||||
public:
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::difference_type
|
||||
typename std::iterator_traits<T>::difference_type
|
||||
difference_type;
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::difference_type
|
||||
typename std::iterator_traits<T>::difference_type
|
||||
distance_type;
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::pointer
|
||||
typename std::iterator_traits<T>::pointer
|
||||
pointer;
|
||||
typedef
|
||||
typename boost::detail::iterator_traits<T>::reference
|
||||
typename std::iterator_traits<T>::reference
|
||||
reference;
|
||||
typedef result_type value_type;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp>
|
||||
#include <boost/iterator.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2010 Bryce Lelbach
|
||||
Copyright (c) 2014 Tomoki Imai
|
||||
|
||||
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)
|
||||
@@ -126,17 +127,30 @@ namespace boost { namespace spirit
|
||||
inline Iterator get_line_start(Iterator lower_bound, Iterator current)
|
||||
{
|
||||
Iterator latest = lower_bound;
|
||||
|
||||
bool prev_was_newline = false;
|
||||
for (Iterator i = lower_bound; i != current; ++i) {
|
||||
switch (*i) {
|
||||
case '\r':
|
||||
case '\n':
|
||||
latest = i;
|
||||
}
|
||||
if (prev_was_newline) {
|
||||
latest = i;
|
||||
}
|
||||
prev_was_newline = (*i == '\r') || (*i == '\n');
|
||||
}
|
||||
if (prev_was_newline) {
|
||||
latest = current;
|
||||
}
|
||||
|
||||
return latest;
|
||||
}
|
||||
|
||||
template <class Iterator>
|
||||
inline Iterator get_line_end(Iterator current, Iterator upper_bound)
|
||||
{
|
||||
for (Iterator i = current; i != upper_bound; ++i) {
|
||||
if ((*i == '\n') || (*i == '\r')) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return upper_bound;
|
||||
}
|
||||
|
||||
|
||||
template <class Iterator>
|
||||
inline iterator_range<Iterator>
|
||||
@@ -145,11 +159,7 @@ namespace boost { namespace spirit
|
||||
Iterator upper_bound)
|
||||
{
|
||||
Iterator first = get_line_start(lower_bound, current);
|
||||
Iterator last = get_line_start(current, upper_bound);
|
||||
|
||||
if (last == current)
|
||||
last = upper_bound;
|
||||
|
||||
Iterator last = get_line_end(current, upper_bound);
|
||||
return iterator_range<Iterator>(first, last);
|
||||
}
|
||||
|
||||
|
||||
@@ -148,19 +148,19 @@ namespace boost { namespace spirit
|
||||
return policies_base_type::less_than(*this, y);
|
||||
}
|
||||
|
||||
bool operator!=(multi_pass const& y)
|
||||
bool operator!=(multi_pass const& y) const
|
||||
{
|
||||
return !(*this == y);
|
||||
}
|
||||
bool operator>(multi_pass const& y)
|
||||
bool operator>(multi_pass const& y) const
|
||||
{
|
||||
return y < *this;
|
||||
}
|
||||
bool operator>=(multi_pass const& y)
|
||||
bool operator>=(multi_pass const& y) const
|
||||
{
|
||||
return !(*this < y);
|
||||
}
|
||||
bool operator<=(multi_pass const& y)
|
||||
bool operator<=(multi_pass const& y) const
|
||||
{
|
||||
return !(y < *this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user