updated boost on windows
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#define BOOST_SPIRIT_X3_TST_MARCH_09_2007_0905AM
|
||||
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace x3 { namespace detail
|
||||
@@ -111,9 +110,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail
|
||||
tst_node** pp = &start;
|
||||
for (;;)
|
||||
{
|
||||
typename
|
||||
boost::detail::iterator_traits<Iterator>::value_type
|
||||
c = *first;
|
||||
auto c = *first;
|
||||
|
||||
if (*pp == 0)
|
||||
*pp = alloc->new_node(c);
|
||||
@@ -147,9 +144,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail
|
||||
if (p == 0 || first == last)
|
||||
return;
|
||||
|
||||
typename
|
||||
boost::detail::iterator_traits<Iterator>::value_type
|
||||
c = *first;
|
||||
auto c = *first;
|
||||
|
||||
if (c == p->id)
|
||||
{
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
|
||||
namespace standard_wide
|
||||
{
|
||||
inline literal_string<wchar_t const*, char_encoding::standard_wide>
|
||||
@@ -103,6 +104,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
return { s };
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace ascii
|
||||
{
|
||||
@@ -162,8 +164,10 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
using standard::string;
|
||||
using standard::lit;
|
||||
#ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
|
||||
using standard_wide::string;
|
||||
using standard_wide::lit;
|
||||
#endif
|
||||
|
||||
namespace extension
|
||||
{
|
||||
@@ -185,6 +189,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
template <int N>
|
||||
struct as_parser<char const[N]> : as_parser<char[N]> {};
|
||||
|
||||
#ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
|
||||
template <int N>
|
||||
struct as_parser<wchar_t[N]>
|
||||
{
|
||||
@@ -202,6 +207,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
template <int N>
|
||||
struct as_parser<wchar_t const[N]> : as_parser<wchar_t[N]> {};
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct as_parser<char const*>
|
||||
|
||||
@@ -21,13 +21,10 @@
|
||||
#include <boost/spirit/home/support/char_encoding/standard.hpp>
|
||||
#include <boost/spirit/home/support/char_encoding/standard_wide.hpp>
|
||||
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <initializer_list>
|
||||
#include <iterator> // std::begin
|
||||
#include <memory> // std::shared_ptr
|
||||
#include <type_traits>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
@@ -48,21 +45,21 @@ namespace boost { namespace spirit { namespace x3
|
||||
typedef value_type attribute_type;
|
||||
|
||||
static bool const has_attribute =
|
||||
!is_same<unused_type, attribute_type>::value;
|
||||
!std::is_same<unused_type, attribute_type>::value;
|
||||
static bool const handles_container =
|
||||
traits::is_container<attribute_type>::value;
|
||||
|
||||
symbols_parser(std::string const& name = "symbols")
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
, lookup(new Lookup())
|
||||
: add{*this}
|
||||
, remove{*this}
|
||||
, lookup(std::make_shared<Lookup>())
|
||||
, name_(name)
|
||||
{
|
||||
}
|
||||
|
||||
symbols_parser(symbols_parser const& syms)
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
: add{*this}
|
||||
, remove{*this}
|
||||
, lookup(syms.lookup)
|
||||
, name_(syms.name_)
|
||||
{
|
||||
@@ -70,54 +67,37 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
template <typename Symbols>
|
||||
symbols_parser(Symbols const& syms, std::string const& name = "symbols")
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
, lookup(new Lookup())
|
||||
, name_(name)
|
||||
: symbols_parser(name)
|
||||
{
|
||||
typename range_const_iterator<Symbols>::type si = boost::begin(syms);
|
||||
while (si != boost::end(syms))
|
||||
add(*si++);
|
||||
for (auto& sym : syms)
|
||||
add(sym);
|
||||
}
|
||||
|
||||
template <typename Symbols, typename Data>
|
||||
symbols_parser(Symbols const& syms, Data const& data
|
||||
, std::string const& name = "symbols")
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
, lookup(new Lookup())
|
||||
, name_(name)
|
||||
: symbols_parser(name)
|
||||
{
|
||||
typename range_const_iterator<Symbols>::type si = boost::begin(syms);
|
||||
typename range_const_iterator<Data>::type di = boost::begin(data);
|
||||
while (si != boost::end(syms))
|
||||
add(*si++, *di++);
|
||||
using std::begin;
|
||||
auto di = begin(data);
|
||||
for (auto& sym : syms)
|
||||
add(sym, *di++);
|
||||
}
|
||||
|
||||
symbols_parser(std::initializer_list<std::pair<char_type const*, T>> syms
|
||||
, std::string const & name="symbols")
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
, lookup(new Lookup())
|
||||
, name_(name)
|
||||
: symbols_parser(name)
|
||||
{
|
||||
typedef std::initializer_list<std::pair<char_type const*, T>> symbols_t;
|
||||
typename range_const_iterator<symbols_t>::type si = boost::begin(syms);
|
||||
for (;si != boost::end(syms); ++si)
|
||||
add(si->first, si->second);
|
||||
for (auto& sym : syms)
|
||||
add(sym.first, sym.second);
|
||||
}
|
||||
|
||||
symbols_parser(std::initializer_list<char_type const*> syms
|
||||
, std::string const &name="symbols")
|
||||
: add(*this)
|
||||
, remove(*this)
|
||||
, lookup(new Lookup())
|
||||
, name_(name)
|
||||
: symbols_parser(name)
|
||||
{
|
||||
typedef std::initializer_list<char_type const*> symbols_t;
|
||||
typename range_const_iterator<symbols_t>::type si = boost::begin(syms);
|
||||
while (si != boost::end(syms))
|
||||
add(*si++);
|
||||
for (auto str : syms)
|
||||
add(str);
|
||||
}
|
||||
|
||||
symbols_parser&
|
||||
@@ -241,14 +221,6 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
struct adder
|
||||
{
|
||||
template <typename, typename = unused_type, typename = unused_type>
|
||||
struct result { typedef adder const& type; };
|
||||
|
||||
adder(symbols_parser& sym)
|
||||
: sym(sym)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
adder const&
|
||||
operator()(Iterator first, Iterator last, T const& val) const
|
||||
@@ -280,14 +252,6 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
struct remover
|
||||
{
|
||||
template <typename, typename = unused_type, typename = unused_type>
|
||||
struct result { typedef remover const& type; };
|
||||
|
||||
remover(symbols_parser& sym)
|
||||
: sym(sym)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
remover const&
|
||||
operator()(Iterator const& first, Iterator const& last) const
|
||||
@@ -319,7 +283,7 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
adder add;
|
||||
remover remove;
|
||||
shared_ptr<Lookup> lookup;
|
||||
std::shared_ptr<Lookup> lookup;
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
@@ -343,11 +307,13 @@ namespace boost { namespace spirit { namespace x3
|
||||
|
||||
using standard::symbols;
|
||||
|
||||
#ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
|
||||
namespace standard_wide
|
||||
{
|
||||
template <typename T = unused_type>
|
||||
using symbols = symbols_parser<char_encoding::standard_wide, T>;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace ascii
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user