update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -130,7 +130,7 @@ public:
void advance(std::ptrdiff_t n)
{
m_pos += n * sizeof(CharT);
m_pos += static_cast<long>(n) * sizeof(CharT);
update_char();
}
@@ -141,14 +141,14 @@ public:
private:
boost::shared_ptr<std::FILE> m_file;
std::size_t m_pos;
long m_pos;
CharT m_curChar;
bool m_eof;
void update_char(void)
{
using namespace std;
if ((std::size_t)ftell(m_file.get()) != m_pos)
if (ftell(m_file.get()) != m_pos)
fseek(m_file.get(), m_pos, SEEK_SET);
m_eof = (fread(&m_curChar, sizeof(CharT), 1, m_file.get()) < 1);

View File

@@ -17,7 +17,7 @@
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/spirit/home/classic/core/nil.hpp> // for nil_t
#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
#include <iterator> // for std::iterator_traits
namespace boost { namespace spirit {
@@ -91,6 +91,16 @@ private:
/* namespace boost::spirit { */ namespace iterator_ { namespace impl {
template <typename T>
struct make_const : boost::add_const<T>
{};
template <typename T>
struct make_const<T&>
{
typedef typename boost::add_const<T>::type& type;
};
///////////////////////////////////////////////////////////////////////////////
//
// position_iterator_base_generator
@@ -104,9 +114,10 @@ template <typename MainIterT, typename ForwardIterT, typename PositionT>
struct position_iterator_base_generator
{
private:
typedef boost::detail::iterator_traits<ForwardIterT> traits;
typedef std::iterator_traits<ForwardIterT> traits;
typedef typename traits::value_type value_type;
typedef typename traits::iterator_category iter_category_t;
typedef typename traits::reference reference;
// Position iterator is always a non-mutable iterator
typedef typename boost::add_const<value_type>::type const_value_type;
@@ -125,7 +136,8 @@ public:
main_iter_t,
ForwardIterT,
const_value_type,
boost::forward_traversal_tag
boost::forward_traversal_tag,
typename make_const<reference>::type
> type;
};

View File

@@ -16,12 +16,10 @@
#include <algorithm> // for std::swap
#include <exception> // for std::exception
#include <boost/limits.hpp>
#include <boost/iterator.hpp>
#include <boost/spirit/home/classic/namespace.hpp>
#include <boost/spirit/home/classic/core/assert.hpp> // for BOOST_SPIRIT_ASSERT
#include <boost/spirit/home/classic/iterator/fixed_size_queue.hpp>
#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
#include <boost/spirit/home/classic/iterator/multi_pass_fwd.hpp>
@@ -147,15 +145,15 @@ class first_owner
// 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 {}
virtual const char*
what() const throw()
what() const BOOST_NOEXCEPT_OR_NOTHROW
{ return "BOOST_SPIRIT_CLASSIC_NS::illegal_backtracking"; }
};
@@ -492,7 +490,7 @@ class inner
{
private:
typedef
typename boost::detail::iterator_traits<InputT>::value_type
typename std::iterator_traits<InputT>::value_type
result_type;
public:
@@ -517,13 +515,13 @@ class inner
public:
typedef
typename boost::detail::iterator_traits<InputT>::difference_type
typename std::iterator_traits<InputT>::difference_type
difference_type;
typedef
typename boost::detail::iterator_traits<InputT>::pointer
typename std::iterator_traits<InputT>::pointer
pointer;
typedef
typename boost::detail::iterator_traits<InputT>::reference
typename std::iterator_traits<InputT>::reference
reference;
protected:
@@ -551,7 +549,7 @@ class inner
}
typedef
typename boost::detail::iterator_traits<InputT>::value_type
typename std::iterator_traits<InputT>::value_type
value_t;
void swap(inner& x)
{
@@ -760,24 +758,19 @@ class inner
namespace iterator_ { namespace impl {
// Meta-function to generate a std::iterator<> base class for multi_pass. This
// is used mainly to improve conformance of compilers not supporting PTS
// and thus relying on inheritance to recognize an iterator.
// We are using boost::iterator<> because it offers an automatic workaround
// for broken std::iterator<> implementations.
// Meta-function to generate a std::iterator<>-like base class for multi_pass.
template <typename InputPolicyT, typename InputT>
struct iterator_base_creator
{
typedef typename InputPolicyT::BOOST_NESTED_TEMPLATE inner<InputT> input_t;
typedef boost::iterator
<
std::forward_iterator_tag,
typename input_t::value_type,
typename input_t::difference_type,
typename input_t::pointer,
typename input_t::reference
> type;
struct type {
typedef std::forward_iterator_tag iterator_category;
typedef typename input_t::value_type value_type;
typedef typename input_t::difference_type difference_type;
typedef typename input_t::pointer pointer;
typedef typename input_t::reference reference;
};
};
}}

View File

@@ -10,7 +10,7 @@
#define BOOST_SPIRIT_POSITION_ITERATOR_FWD_HPP
#include <string>
#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
#include <iterator> // for std::iterator_traits
#include <boost/spirit/home/classic/namespace.hpp>
#include <boost/spirit/home/classic/core/nil.hpp>
@@ -32,7 +32,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename ForwardIteratorT,
typename PositionT = file_position_base<
std::basic_string<
typename boost::detail::iterator_traits<ForwardIteratorT>::value_type
typename std::iterator_traits<ForwardIteratorT>::value_type
>
>,
typename SelfT = nil_t
@@ -44,7 +44,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename ForwardIteratorT,
typename PositionT = file_position_base<
std::basic_string<
typename boost::detail::iterator_traits<ForwardIteratorT>::value_type
typename std::iterator_traits<ForwardIteratorT>::value_type
>
>
>