summaryrefslogtreecommitdiff
path: root/boost/spirit/home/classic
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:30:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:32:57 +0900
commit71d216b90256936a9638f325af9bc69d720e75de (patch)
tree9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/spirit/home/classic
parent733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff)
downloadboost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz
boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2
boost-71d216b90256936a9638f325af9bc69d720e75de.zip
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/spirit/home/classic')
-rw-r--r--boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp3
-rw-r--r--boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp11
-rw-r--r--boost/spirit/home/classic/core/non_terminal/impl/static.hpp4
-rw-r--r--boost/spirit/home/classic/core/primitives/primitives.hpp1
-rw-r--r--boost/spirit/home/classic/meta/refactoring.hpp4
-rw-r--r--boost/spirit/home/classic/phoenix/closures.hpp4
-rw-r--r--boost/spirit/home/classic/phoenix/statements.hpp2
-rw-r--r--boost/spirit/home/classic/utility/functor_parser.hpp2
-rw-r--r--boost/spirit/home/classic/utility/impl/chset.ipp6
-rw-r--r--boost/spirit/home/classic/utility/scoped_lock.hpp3
10 files changed, 26 insertions, 14 deletions
diff --git a/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp b/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
index b26f534751..1f18b3255c 100644
--- a/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
+++ b/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
@@ -23,6 +23,7 @@
#include <boost/spirit/home/classic/core/non_terminal/impl/static.hpp>
#include <boost/thread/tss.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_types.hpp>
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -159,7 +160,7 @@ struct grammar_definition
result(new definition_t(target_grammar->derived()));
#ifdef BOOST_SPIRIT_THREADSAFE
- boost::mutex::scoped_lock lock(helpers.mutex());
+ boost::unique_lock<boost::mutex> lock(helpers.mutex());
#endif
helpers.push_back(this);
diff --git a/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp b/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp
index 822180a977..c39d359cbd 100644
--- a/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp
+++ b/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp
@@ -15,6 +15,7 @@
#ifdef BOOST_SPIRIT_THREADSAFE
#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_types.hpp>
#include <boost/thread/once.hpp>
#endif
@@ -99,7 +100,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
object_with_id_base_supply<IdT>::acquire()
{
#ifdef BOOST_SPIRIT_THREADSAFE
- boost::mutex::scoped_lock lock(mutex);
+ boost::unique_lock<boost::mutex> lock(mutex);
#endif
if (free_ids.size())
{
@@ -121,7 +122,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
object_with_id_base_supply<IdT>::release(IdT id)
{
#ifdef BOOST_SPIRIT_THREADSAFE
- boost::mutex::scoped_lock lock(mutex);
+ boost::unique_lock<boost::mutex> lock(mutex);
#endif
if (max_id == id)
max_id--;
@@ -136,10 +137,14 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
{
{
#ifdef BOOST_SPIRIT_THREADSAFE
+#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11
static boost::once_flag been_here = BOOST_ONCE_INIT;
+#else
+ static boost::once_flag been_here;
+#endif
boost::call_once(been_here, mutex_init);
boost::mutex &mutex = mutex_instance();
- boost::mutex::scoped_lock lock(mutex);
+ boost::unique_lock<boost::mutex> lock(mutex);
#endif
static boost::shared_ptr<object_with_id_base_supply<IdT> >
static_supply;
diff --git a/boost/spirit/home/classic/core/non_terminal/impl/static.hpp b/boost/spirit/home/classic/core/non_terminal/impl/static.hpp
index 89c6d29c3c..ae2a66c506 100644
--- a/boost/spirit/home/classic/core/non_terminal/impl/static.hpp
+++ b/boost/spirit/home/classic/core/non_terminal/impl/static.hpp
@@ -111,7 +111,11 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename static_<T, Tag>::storage_type static_<T, Tag>::data_;
template <class T, class Tag>
+#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11
once_flag static_<T, Tag>::constructed_ = BOOST_ONCE_INIT;
+#else
+ once_flag static_<T, Tag>::constructed_;
+#endif
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
diff --git a/boost/spirit/home/classic/core/primitives/primitives.hpp b/boost/spirit/home/classic/core/primitives/primitives.hpp
index d89585b102..cd87c3dda8 100644
--- a/boost/spirit/home/classic/core/primitives/primitives.hpp
+++ b/boost/spirit/home/classic/core/primitives/primitives.hpp
@@ -47,7 +47,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
{
- typedef typename parser_result<self_t, ScannerT>::type result_t;
typedef typename ScannerT::value_t value_t;
typedef typename ScannerT::iterator_t iterator_t;
diff --git a/boost/spirit/home/classic/meta/refactoring.hpp b/boost/spirit/home/classic/meta/refactoring.hpp
index e5d45f9297..fa45b01548 100644
--- a/boost/spirit/home/classic/meta/refactoring.hpp
+++ b/boost/spirit/home/classic/meta/refactoring.hpp
@@ -197,7 +197,7 @@ const refactor_action_gen<> refactor_action_d = refactor_action_gen<>();
// attach_action_parser class
//
// This helper template allows to attach an action given separately
-// to to all parsers, out of which the given parser is constructed and
+// to all parsers, out of which the given parser is constructed and
// reconstructs a new parser having the same structure.
//
// For instance the parser:
@@ -208,7 +208,7 @@ const refactor_action_gen<> refactor_action_d = refactor_action_gen<>();
// >> another_parser[some_attached_functor]
//
// The original parser should be a action_parser_category parser,
-// else the compilation will fail
+// else the compilation will fail.
//
// If the parser, to which the action is attached is not an binary parser,
// no refactoring is done at all.
diff --git a/boost/spirit/home/classic/phoenix/closures.hpp b/boost/spirit/home/classic/phoenix/closures.hpp
index 6493e387a3..f833b4ef59 100644
--- a/boost/spirit/home/classic/phoenix/closures.hpp
+++ b/boost/spirit/home/classic/phoenix/closures.hpp
@@ -419,7 +419,11 @@ private:
closure_frame_holder_ref(holder_t* holder_ = 0)
{
#ifdef PHOENIX_THREADSAFE
+#ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11
static boost::once_flag been_here = BOOST_ONCE_INIT;
+#else
+ static boost::once_flag been_here;
+#endif
boost::call_once(been_here, tsp_frame_instance_init);
boost::thread_specific_ptr<holder_t*> &tsp_frame = tsp_frame_instance();
if (!tsp_frame.get())
diff --git a/boost/spirit/home/classic/phoenix/statements.hpp b/boost/spirit/home/classic/phoenix/statements.hpp
index 7726a99d4b..dd62cb2ebb 100644
--- a/boost/spirit/home/classic/phoenix/statements.hpp
+++ b/boost/spirit/home/classic/phoenix/statements.hpp
@@ -285,7 +285,7 @@ while_(CondT const& cond)
// While the condition (an actor) evaluates to true, statement
// (another actor) is executed. The statement is executed at least
// once. The result type of this is void. Note the trailing
-// underscore after do_ and the the leading dot and the trailing
+// underscore after do_ and the leading dot and the trailing
// underscore before and after .while_.
//
///////////////////////////////////////////////////////////////////////////////
diff --git a/boost/spirit/home/classic/utility/functor_parser.hpp b/boost/spirit/home/classic/utility/functor_parser.hpp
index ac53751bcc..e991eaf7d7 100644
--- a/boost/spirit/home/classic/utility/functor_parser.hpp
+++ b/boost/spirit/home/classic/utility/functor_parser.hpp
@@ -49,8 +49,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
{
- typedef typename parser_result<self_t, ScannerT>::type result_t;
- typedef typename ScannerT::value_t value_t;
typedef typename ScannerT::iterator_t iterator_t;
iterator_t const s(scan.first);
diff --git a/boost/spirit/home/classic/utility/impl/chset.ipp b/boost/spirit/home/classic/utility/impl/chset.ipp
index 6e2130b222..f6da6f2f3f 100644
--- a/boost/spirit/home/classic/utility/impl/chset.ipp
+++ b/boost/spirit/home/classic/utility/impl/chset.ipp
@@ -97,7 +97,7 @@ inline chset<CharT>::chset(anychar_parser /*arg*/)
}
template <typename CharT>
-inline chset<CharT>::chset(nothing_parser arg_)
+inline chset<CharT>::chset(nothing_parser /*arg_*/)
: ptr(new basic_chset<CharT>()) {}
template <typename CharT>
@@ -146,7 +146,7 @@ chset<CharT>::operator=(CharT rhs)
template <typename CharT>
inline chset<CharT>&
-chset<CharT>::operator=(anychar_parser rhs)
+chset<CharT>::operator=(anychar_parser /*rhs*/)
{
utility::impl::detach_clear(ptr);
ptr->set(
@@ -158,7 +158,7 @@ chset<CharT>::operator=(anychar_parser rhs)
template <typename CharT>
inline chset<CharT>&
-chset<CharT>::operator=(nothing_parser rhs)
+chset<CharT>::operator=(nothing_parser /*rhs*/)
{
utility::impl::detach_clear(ptr);
return *this;
diff --git a/boost/spirit/home/classic/utility/scoped_lock.hpp b/boost/spirit/home/classic/utility/scoped_lock.hpp
index 952fd8785e..6e521692ae 100644
--- a/boost/spirit/home/classic/utility/scoped_lock.hpp
+++ b/boost/spirit/home/classic/utility/scoped_lock.hpp
@@ -10,6 +10,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <boost/spirit/home/classic/namespace.hpp>
+#include <boost/thread/lock_types.hpp>
#if !defined(BOOST_SPIRIT_COMPOSITE_HPP)
#include <boost/spirit/home/classic/core/composite.hpp>
#endif
@@ -51,7 +52,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const &scan) const
{
- typedef typename mutex_t::scoped_lock scoped_lock_t;
+ typedef boost::unique_lock<mutex_t> scoped_lock_t;
scoped_lock_t lock(mutex);
return this->subject().parse(scan);
}