update boost
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <iterator> // for std::iterator_traits
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
|
||||
@@ -117,10 +117,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
String str;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
literal_string& operator= (literal_string const&);
|
||||
};
|
||||
|
||||
template <typename String, bool no_attribute>
|
||||
@@ -138,7 +134,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
, str_hi(in)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
(void)encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
#endif
|
||||
typename string_type::iterator loi = str_lo.begin();
|
||||
typename string_type::iterator hii = str_hi.begin();
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/support/string_traits.hpp>
|
||||
|
||||
#include <boost/proto/extends.hpp>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
@@ -284,6 +285,10 @@ public:
|
||||
return name_;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
struct adder
|
||||
{
|
||||
template <typename, typename = unused_type, typename = unused_type>
|
||||
@@ -321,10 +326,6 @@ public:
|
||||
}
|
||||
|
||||
symbols& sym;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
adder& operator= (adder const&);
|
||||
};
|
||||
|
||||
struct remover
|
||||
@@ -364,11 +365,10 @@ public:
|
||||
}
|
||||
|
||||
symbols& sym;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
remover& operator= (remover const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
adder add;
|
||||
remover remove;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <boost/spirit/home/qi/string/detail/tst.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/pool/object_pool.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
@@ -133,11 +132,12 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
void clear()
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type& x, map)
|
||||
typedef typename map_type::iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
node::destruct_node(x.second.root, this);
|
||||
if (x.second.data)
|
||||
this->delete_data(x.second.data);
|
||||
node::destruct_node(it->second.root, this);
|
||||
if (it->second.data)
|
||||
this->delete_data(it->second.data);
|
||||
}
|
||||
map.clear();
|
||||
}
|
||||
@@ -145,12 +145,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
template <typename F>
|
||||
void for_each(F f) const
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type const& x, map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
std::basic_string<Char> s(1, x.first);
|
||||
node::for_each(x.second.root, s, f);
|
||||
if (x.second.data)
|
||||
f(s, *x.second.data);
|
||||
std::basic_string<Char> s(1, it->first);
|
||||
node::for_each(it->second.root, s, f);
|
||||
if (it->second.data)
|
||||
f(s, *it->second.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,12 +169,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
void copy(tst_map const& rhs)
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type const& x, rhs.map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = rhs.map.begin(), end = rhs.map.end(); it != end; ++it)
|
||||
{
|
||||
map_data xx = {node::clone_node(x.second.root, this), 0};
|
||||
if (x.second.data)
|
||||
xx.data = data_pool.construct(*x.second.data);
|
||||
map[x.first] = xx;
|
||||
map_data xx = {node::clone_node(it->second.root, this), 0};
|
||||
if (it->second.data)
|
||||
xx.data = data_pool.construct(*it->second.data);
|
||||
map[it->first] = xx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,9 +183,10 @@ namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
if (this != &rhs)
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type& x, map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
node::destruct_node(x.second.root, this);
|
||||
node::destruct_node(it->second.root, this);
|
||||
}
|
||||
map.clear();
|
||||
copy(rhs);
|
||||
|
||||
Reference in New Issue
Block a user