update boost
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
#ifndef BOOST_SIGNALS2_CONNECTION_HPP
|
||||
#define BOOST_SIGNALS2_CONNECTION_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signals2/detail/auto_buffer.hpp>
|
||||
#include <boost/signals2/detail/null_output_iterator.hpp>
|
||||
@@ -229,22 +230,22 @@ namespace boost
|
||||
public:
|
||||
friend class shared_connection_block;
|
||||
|
||||
connection() {}
|
||||
connection(const connection &other): _weak_connection_body(other._weak_connection_body)
|
||||
connection() BOOST_NOEXCEPT {}
|
||||
connection(const connection &other) BOOST_NOEXCEPT: _weak_connection_body(other._weak_connection_body)
|
||||
{}
|
||||
connection(const boost::weak_ptr<detail::connection_body_base> &connectionBody):
|
||||
connection(const boost::weak_ptr<detail::connection_body_base> &connectionBody) BOOST_NOEXCEPT:
|
||||
_weak_connection_body(connectionBody)
|
||||
{}
|
||||
|
||||
// move support
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
connection(connection && other): _weak_connection_body(std::move(other._weak_connection_body))
|
||||
connection(connection && other) BOOST_NOEXCEPT: _weak_connection_body(std::move(other._weak_connection_body))
|
||||
{
|
||||
// make sure other is reset, in case it is a scoped_connection (so it
|
||||
// won't disconnect on destruction after being moved away from).
|
||||
other._weak_connection_body.reset();
|
||||
}
|
||||
connection & operator=(connection && other)
|
||||
connection & operator=(connection && other) BOOST_NOEXCEPT
|
||||
{
|
||||
if(&other == this) return *this;
|
||||
_weak_connection_body = std::move(other._weak_connection_body);
|
||||
@@ -254,7 +255,7 @@ namespace boost
|
||||
return *this;
|
||||
}
|
||||
#endif // !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
connection & operator=(const connection & other)
|
||||
connection & operator=(const connection & other) BOOST_NOEXCEPT
|
||||
{
|
||||
if(&other == this) return *this;
|
||||
_weak_connection_body = other._weak_connection_body;
|
||||
@@ -296,7 +297,7 @@ namespace boost
|
||||
boost::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock());
|
||||
return connectionBody < otherConnectionBody;
|
||||
}
|
||||
void swap(connection &other)
|
||||
void swap(connection &other) BOOST_NOEXCEPT
|
||||
{
|
||||
using std::swap;
|
||||
swap(_weak_connection_body, other._weak_connection_body);
|
||||
@@ -305,7 +306,7 @@ namespace boost
|
||||
|
||||
boost::weak_ptr<detail::connection_body_base> _weak_connection_body;
|
||||
};
|
||||
inline void swap(connection &conn1, connection &conn2)
|
||||
inline void swap(connection &conn1, connection &conn2) BOOST_NOEXCEPT
|
||||
{
|
||||
conn1.swap(conn2);
|
||||
}
|
||||
@@ -313,15 +314,15 @@ namespace boost
|
||||
class scoped_connection: public connection
|
||||
{
|
||||
public:
|
||||
scoped_connection() {}
|
||||
scoped_connection(const connection &other):
|
||||
scoped_connection() BOOST_NOEXCEPT {}
|
||||
scoped_connection(const connection &other) BOOST_NOEXCEPT:
|
||||
connection(other)
|
||||
{}
|
||||
~scoped_connection()
|
||||
{
|
||||
disconnect();
|
||||
}
|
||||
scoped_connection& operator=(const connection &rhs)
|
||||
scoped_connection& operator=(const connection &rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
disconnect();
|
||||
connection::operator=(rhs);
|
||||
@@ -330,20 +331,20 @@ namespace boost
|
||||
|
||||
// move support
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
scoped_connection(scoped_connection && other): connection(std::move(other))
|
||||
scoped_connection(scoped_connection && other) BOOST_NOEXCEPT: connection(std::move(other))
|
||||
{
|
||||
}
|
||||
scoped_connection(connection && other): connection(std::move(other))
|
||||
scoped_connection(connection && other) BOOST_NOEXCEPT: connection(std::move(other))
|
||||
{
|
||||
}
|
||||
scoped_connection & operator=(scoped_connection && other)
|
||||
scoped_connection & operator=(scoped_connection && other) BOOST_NOEXCEPT
|
||||
{
|
||||
if(&other == this) return *this;
|
||||
disconnect();
|
||||
connection::operator=(std::move(other));
|
||||
return *this;
|
||||
}
|
||||
scoped_connection & operator=(connection && other)
|
||||
scoped_connection & operator=(connection && other) BOOST_NOEXCEPT
|
||||
{
|
||||
if(&other == this) return *this;
|
||||
disconnect();
|
||||
@@ -364,7 +365,7 @@ namespace boost
|
||||
};
|
||||
// Sun 5.9 compiler doesn't find the swap for base connection class when
|
||||
// arguments are scoped_connection, so we provide this explicitly.
|
||||
inline void swap(scoped_connection &conn1, scoped_connection &conn2)
|
||||
inline void swap(scoped_connection &conn1, scoped_connection &conn2) BOOST_NOEXCEPT
|
||||
{
|
||||
conn1.swap(conn2);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define BOOST_SIGNALS2_DECONSTRUCT_PTR_HPP
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/checked_delete.hpp>
|
||||
#include <boost/core/checked_delete.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/signals2/postconstructible.hpp>
|
||||
#include <boost/signals2/predestructible.hpp>
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
#endif
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/allocator_access.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/multi_index/detail/scope_guard.hpp>
|
||||
#include <boost/swap.hpp>
|
||||
#include <boost/signals2/detail/scope_guard.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/type_traits/has_nothrow_copy.hpp>
|
||||
@@ -139,10 +141,10 @@ namespace detail
|
||||
public:
|
||||
typedef Allocator allocator_type;
|
||||
typedef T value_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef typename Allocator::difference_type difference_type;
|
||||
typedef typename boost::allocator_size_type<Allocator>::type size_type;
|
||||
typedef typename boost::allocator_difference_type<Allocator>::type difference_type;
|
||||
typedef T* pointer;
|
||||
typedef typename Allocator::pointer allocator_pointer;
|
||||
typedef typename boost::allocator_pointer<Allocator>::type allocator_pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
@@ -288,11 +290,10 @@ namespace detail
|
||||
pointer move_to_new_buffer( size_type new_capacity, const boost::false_type& )
|
||||
{
|
||||
pointer new_buffer = allocate( new_capacity ); // strong
|
||||
boost::multi_index::detail::scope_guard guard =
|
||||
boost::multi_index::detail::make_obj_guard( *this,
|
||||
&auto_buffer::deallocate,
|
||||
new_buffer,
|
||||
new_capacity );
|
||||
scope_guard guard = make_obj_guard( *this,
|
||||
&auto_buffer::deallocate,
|
||||
new_buffer,
|
||||
new_capacity );
|
||||
copy_impl( begin(), end(), new_buffer ); // strong
|
||||
guard.dismiss(); // nothrow
|
||||
return new_buffer;
|
||||
@@ -517,11 +518,10 @@ namespace detail
|
||||
auto_buffer_destroy();
|
||||
buffer_ = 0;
|
||||
pointer new_buffer = allocate( r.size() );
|
||||
boost::multi_index::detail::scope_guard guard =
|
||||
boost::multi_index::detail::make_obj_guard( *this,
|
||||
&auto_buffer::deallocate,
|
||||
new_buffer,
|
||||
r.size() );
|
||||
scope_guard guard = make_obj_guard( *this,
|
||||
&auto_buffer::deallocate,
|
||||
new_buffer,
|
||||
r.size() );
|
||||
copy_impl( r.begin(), r.end(), new_buffer );
|
||||
guard.dismiss();
|
||||
buffer_ = new_buffer;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/smart_ptr/bad_weak_ptr.hpp>
|
||||
#include <boost/utility/swap.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SMART_PTR
|
||||
#include <memory>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
// Copyright (c) 2002, 2003 Peter Dimov
|
||||
// Copyright (c) 2008 Frank Mori Hess
|
||||
// Copyright (c) Microsoft Corporation 2014
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -19,7 +18,6 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/predef.h>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#ifdef BOOST_USE_WINDOWS_H
|
||||
@@ -57,11 +55,7 @@ struct critical_section
|
||||
#endif
|
||||
};
|
||||
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME
|
||||
extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(::_RTL_CRITICAL_SECTION *, unsigned long, unsigned long);
|
||||
#else
|
||||
extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
|
||||
#endif
|
||||
extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
|
||||
extern "C" __declspec(dllimport) int __stdcall TryEnterCriticalSection(::_RTL_CRITICAL_SECTION *);
|
||||
extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
|
||||
@@ -73,11 +67,7 @@ typedef ::_RTL_CRITICAL_SECTION rtl_critical_section;
|
||||
|
||||
typedef ::CRITICAL_SECTION critical_section;
|
||||
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME
|
||||
using ::InitializeCriticalSectionEx;
|
||||
#else
|
||||
using ::InitializeCriticalSection;
|
||||
#endif
|
||||
using ::EnterCriticalSection;
|
||||
using ::TryEnterCriticalSection;
|
||||
using ::LeaveCriticalSection;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP
|
||||
#define BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP
|
||||
|
||||
#include <boost/function_output_iterator.hpp>
|
||||
#include <boost/iterator/function_output_iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
110
linx64/include/boost/signals2/detail/scope_guard.hpp
Normal file
110
linx64/include/boost/signals2/detail/scope_guard.hpp
Normal file
@@ -0,0 +1,110 @@
|
||||
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
|
||||
* 2019 Mike Dev <mike.dev@gmx.de>
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* https://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* NOTE: internalized from Boost.MultiIndex
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_SIGNALS2_DETAIL_SCOPE_GUARD_HPP
|
||||
#define BOOST_SIGNALS2_DETAIL_SCOPE_GUARD_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace signals2{
|
||||
|
||||
namespace detail{
|
||||
|
||||
/* This is a merely reformated version of
|
||||
* ScopeGuard.h as defined in:
|
||||
* Alexandrescu, A., Marginean, P.:"Generic<Programming>: Change the Way You
|
||||
* Write Exception-Safe Code - Forever", C/C++ Users Jornal, Dec 2000,
|
||||
* http://www.drdobbs.com/184403758
|
||||
* with the following modifications:
|
||||
* - General pretty formatting (pretty to my taste at least.)
|
||||
* - Naming style changed to standard C++ library requirements.
|
||||
* - Removed RefHolder and ByRef, whose functionality is provided
|
||||
* already by Boost.Ref.
|
||||
* - Removed static make_guard's and make_obj_guard's, so that the code
|
||||
* will work even if BOOST_NO_MEMBER_TEMPLATES is defined. This forces
|
||||
* us to move some private ctors to public, though.
|
||||
*
|
||||
* NB: CodeWarrior Pro 8 seems to have problems looking up safe_execute
|
||||
* without an explicit qualification.
|
||||
*
|
||||
* TODO: Consider replacing with Boost.ScopeExit
|
||||
*
|
||||
*/
|
||||
|
||||
class scope_guard_impl_base
|
||||
{
|
||||
public:
|
||||
scope_guard_impl_base():dismissed_(false){}
|
||||
void dismiss()const{dismissed_=true;}
|
||||
|
||||
protected:
|
||||
~scope_guard_impl_base(){}
|
||||
|
||||
scope_guard_impl_base(const scope_guard_impl_base& other):
|
||||
dismissed_(other.dismissed_)
|
||||
{
|
||||
other.dismiss();
|
||||
}
|
||||
|
||||
template<typename J>
|
||||
static void safe_execute(J& j){
|
||||
BOOST_TRY{
|
||||
if(!j.dismissed_)j.execute();
|
||||
}
|
||||
BOOST_CATCH(...){}
|
||||
BOOST_CATCH_END
|
||||
}
|
||||
|
||||
mutable bool dismissed_;
|
||||
|
||||
private:
|
||||
scope_guard_impl_base& operator=(const scope_guard_impl_base&);
|
||||
};
|
||||
|
||||
typedef const scope_guard_impl_base& scope_guard;
|
||||
|
||||
template<class Obj,typename MemFun,typename P1,typename P2>
|
||||
class obj_scope_guard_impl2:public scope_guard_impl_base
|
||||
{
|
||||
public:
|
||||
obj_scope_guard_impl2(Obj& obj,MemFun mem_fun,P1 p1,P2 p2):
|
||||
obj_(obj),mem_fun_(mem_fun),p1_(p1),p2_(p2)
|
||||
{}
|
||||
~obj_scope_guard_impl2(){scope_guard_impl_base::safe_execute(*this);}
|
||||
void execute(){(obj_.*mem_fun_)(p1_,p2_);}
|
||||
|
||||
protected:
|
||||
Obj& obj_;
|
||||
MemFun mem_fun_;
|
||||
const P1 p1_;
|
||||
const P2 p2_;
|
||||
};
|
||||
|
||||
template<class Obj,typename MemFun,typename P1,typename P2>
|
||||
inline obj_scope_guard_impl2<Obj,MemFun,P1,P2>
|
||||
make_obj_guard(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
|
||||
{
|
||||
return obj_scope_guard_impl2<Obj,MemFun,P1,P2>(obj,mem_fun,p1,p2);
|
||||
}
|
||||
|
||||
} /* namespace signals2::detail */
|
||||
|
||||
} /* namespace signals2 */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#endif
|
||||
@@ -153,7 +153,7 @@ namespace boost
|
||||
|
||||
BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner_arg,
|
||||
const group_compare_type &group_compare):
|
||||
_shared_state(new invocation_state(connection_list_type(group_compare), combiner_arg)),
|
||||
_shared_state(boost::make_shared<invocation_state>(connection_list_type(group_compare), combiner_arg)),
|
||||
_garbage_collector_it(_shared_state->connection_bodies().end()),
|
||||
_mutex(new mutex_type())
|
||||
{}
|
||||
@@ -306,7 +306,7 @@ namespace boost
|
||||
if(_shared_state.unique())
|
||||
_shared_state->combiner() = combiner_arg;
|
||||
else
|
||||
_shared_state.reset(new invocation_state(*_shared_state, combiner_arg));
|
||||
_shared_state = boost::make_shared<invocation_state>(*_shared_state, combiner_arg);
|
||||
}
|
||||
private:
|
||||
typedef Mutex mutex_type;
|
||||
@@ -475,7 +475,7 @@ namespace boost
|
||||
{
|
||||
if(_shared_state.unique() == false)
|
||||
{
|
||||
_shared_state.reset(new invocation_state(*_shared_state, _shared_state->connection_bodies()));
|
||||
_shared_state = boost::make_shared<invocation_state>(*_shared_state, _shared_state->connection_bodies());
|
||||
nolock_cleanup_connections_from(lock, true, _shared_state->connection_bodies().begin());
|
||||
}else
|
||||
{
|
||||
@@ -497,7 +497,7 @@ namespace boost
|
||||
}
|
||||
if(_shared_state.unique() == false)
|
||||
{
|
||||
_shared_state.reset(new invocation_state(*_shared_state, _shared_state->connection_bodies()));
|
||||
_shared_state = boost::make_shared<invocation_state>(*_shared_state, _shared_state->connection_bodies());
|
||||
}
|
||||
nolock_cleanup_connections_from(list_lock, false, _shared_state->connection_bodies().begin());
|
||||
}
|
||||
@@ -510,7 +510,7 @@ namespace boost
|
||||
const slot_type &slot)
|
||||
{
|
||||
nolock_force_unique_connection_list(lock);
|
||||
return connection_body_type(new connection_body<group_key_type, slot_type, Mutex>(slot, _mutex));
|
||||
return boost::make_shared<connection_body<group_key_type, slot_type, Mutex> >(slot, _mutex);
|
||||
}
|
||||
void do_disconnect(const group_type &group, mpl::bool_<true> /* is_group */)
|
||||
{
|
||||
@@ -527,7 +527,7 @@ namespace boost
|
||||
{
|
||||
garbage_collecting_lock<connection_body_base> lock(**it);
|
||||
if((*it)->nolock_nograb_connected() == false) continue;
|
||||
if((*it)->slot().slot_function() == slot)
|
||||
if((*it)->slot().slot_function().contains(slot))
|
||||
{
|
||||
(*it)->nolock_disconnect(lock);
|
||||
}else
|
||||
@@ -535,7 +535,7 @@ namespace boost
|
||||
// check for wrapped extended slot
|
||||
bound_extended_slot_function_type *fp;
|
||||
fp = (*it)->slot().slot_function().template target<bound_extended_slot_function_type>();
|
||||
if(fp && *fp == slot)
|
||||
if(fp && function_equal(*fp, slot))
|
||||
{
|
||||
(*it)->nolock_disconnect(lock);
|
||||
}
|
||||
@@ -658,7 +658,7 @@ namespace boost
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner_arg = combiner_type(),
|
||||
const group_compare_type &group_compare = group_compare_type()):
|
||||
_pimpl(new impl_class(combiner_arg, group_compare))
|
||||
{};
|
||||
{}
|
||||
virtual ~BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)()
|
||||
{
|
||||
}
|
||||
@@ -666,14 +666,14 @@ namespace boost
|
||||
//move support
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) && other)
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) && other) BOOST_NOEXCEPT
|
||||
{
|
||||
using std::swap;
|
||||
swap(_pimpl, other._pimpl);
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) &
|
||||
operator=(BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) && rhs)
|
||||
operator=(BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) && rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
if(this == &rhs)
|
||||
{
|
||||
@@ -741,7 +741,7 @@ namespace boost
|
||||
{
|
||||
return (*_pimpl).set_combiner(combiner_arg);
|
||||
}
|
||||
void swap(BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) & other)
|
||||
void swap(BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) & other) BOOST_NOEXCEPT
|
||||
{
|
||||
using std::swap;
|
||||
swap(_pimpl, other._pimpl);
|
||||
@@ -761,7 +761,7 @@ namespace boost
|
||||
template<BOOST_SIGNALS2_SIGNAL_TEMPLATE_DECL(BOOST_SIGNALS2_NUM_ARGS)>
|
||||
void swap(
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> &sig1,
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> &sig2 )
|
||||
BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> &sig2 ) BOOST_NOEXCEPT
|
||||
{
|
||||
sig1.swap(sig2);
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#ifndef BOOST_SIGNALS2_SIGNALS_COMMON_HPP
|
||||
#define BOOST_SIGNALS2_SIGNALS_COMMON_HPP
|
||||
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/signals2/signal_base.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#define BOOST_SIGNALS2_SLOT_CALL_ITERATOR_HPP
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/aligned_storage.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
@@ -24,6 +23,7 @@
|
||||
#include <boost/signals2/detail/unique_lock.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace boost {
|
||||
@@ -149,21 +149,11 @@ namespace boost {
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(iter == end)
|
||||
{
|
||||
if(callable_iter != end)
|
||||
{
|
||||
lock_type lock(**callable_iter);
|
||||
set_callable_iter(lock, end);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// we're only locking the first connection body,
|
||||
// but it doesn't matter they all use the same mutex
|
||||
lock_type lock(**iter);
|
||||
|
||||
for(;iter != end; ++iter)
|
||||
{
|
||||
cache->tracked_ptrs.clear();
|
||||
lock_type lock(**iter);
|
||||
(*iter)->nolock_grab_tracked_objects(lock, std::back_inserter(cache->tracked_ptrs));
|
||||
if((*iter)->nolock_nograb_connected())
|
||||
{
|
||||
@@ -178,9 +168,14 @@ namespace boost {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(iter == end)
|
||||
{
|
||||
set_callable_iter(lock, end);
|
||||
if(callable_iter != end)
|
||||
{
|
||||
lock_type lock(**callable_iter);
|
||||
set_callable_iter(lock, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
#ifndef BOOST_SIGNALS2_TRACKED_OBJECTS_VISITOR_HPP
|
||||
#define BOOST_SIGNALS2_TRACKED_OBJECTS_VISITOR_HPP
|
||||
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/signals2/detail/signals_common.hpp>
|
||||
#include <boost/signals2/slot_base.hpp>
|
||||
#include <boost/signals2/trackable.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/utility/addressof.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BOOST_SIGNALS2_UNIQUE_LOCK_HPP
|
||||
#define BOOST_SIGNALS2_UNIQUE_LOCK_HPP
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
@@ -15,15 +15,17 @@
|
||||
#ifndef BOOST_SIGNALS2_PREPROCESSED_SIGNAL_HPP
|
||||
#define BOOST_SIGNALS2_PREPROCESSED_SIGNAL_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/preprocessor/arithmetic.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/control/expr_if.hpp>
|
||||
#include <boost/preprocessor/iteration.hpp>
|
||||
#include <boost/preprocessor/repetition.hpp>
|
||||
#include <boost/signals2/detail/preprocessed_arg_type.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_SIGNALS2_MAX_ARGS)
|
||||
#define BOOST_PP_FILENAME_1 <boost/signals2/detail/signal_template.hpp>
|
||||
@@ -51,8 +53,8 @@ namespace boost
|
||||
base_type(combiner_arg, group_compare)
|
||||
{}
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_WORKAROUND(BOOST_MSVC, < 1800)
|
||||
signal(signal && other) : base_type(std::move(other)) {}
|
||||
signal & operator=(signal && other) { base_type::operator=(std::move(other)); return *this; }
|
||||
signal(signal && other) BOOST_NOEXCEPT: base_type(std::move(other)) {}
|
||||
signal & operator=(signal && other) BOOST_NOEXCEPT{ base_type::operator=(std::move(other)); return *this; }
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
#include <algorithm>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
#include <boost/signals2/detail/unique_lock.hpp>
|
||||
@@ -52,7 +52,7 @@ namespace boost
|
||||
typename Mutex>
|
||||
void swap(
|
||||
signal<Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex> &sig1,
|
||||
signal<Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex> &sig2)
|
||||
signal<Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex> &sig2) BOOST_NOEXCEPT
|
||||
{
|
||||
sig1.swap(sig2);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef BOOST_SIGNALS2_SIGNAL_BASE_HPP
|
||||
#define BOOST_SIGNALS2_SIGNAL_BASE_HPP
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
#ifndef BOOST_SIGNALS2_SIGNAL_TYPE_HPP
|
||||
#define BOOST_SIGNALS2_SIGNAL_TYPE_HPP
|
||||
|
||||
// support for function types is currently broken in Boost.Parameter
|
||||
// #define BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
#if !defined(BOOST_PARAMETER_MAX_ARITY)
|
||||
#define BOOST_PARAMETER_MAX_ARITY 7
|
||||
#else
|
||||
#if BOOST_PARAMETER_MAX_ARITY < 7
|
||||
#error This header requires BOOST_PARAMETER_MAX_ARITY to be defined as 7 or greater prior to including Boost.Parameter headers
|
||||
#endif // BOOST_PARAMETER_MAX_ARITY < 7
|
||||
#endif // !defined(BOOST_PARAMETER_MAX_ARITY)
|
||||
#include <boost/parameter.hpp>
|
||||
#error Define BOOST_PARAMETER_MAX_ARITY as 7 or greater.
|
||||
#endif
|
||||
|
||||
#include <boost/parameter/template_keyword.hpp>
|
||||
#include <boost/parameter/parameters.hpp>
|
||||
#include <boost/parameter/required.hpp>
|
||||
#include <boost/parameter/optional.hpp>
|
||||
#include <boost/parameter/value_type.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/type_traits/function_traits.hpp>
|
||||
#include <boost/signals2/signal.hpp>
|
||||
#include <functional>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@@ -39,9 +39,7 @@ namespace boost
|
||||
{
|
||||
namespace keywords
|
||||
{
|
||||
#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
BOOST_PARAMETER_TEMPLATE_KEYWORD(signature_type)
|
||||
#endif
|
||||
BOOST_PARAMETER_TEMPLATE_KEYWORD(combiner_type)
|
||||
BOOST_PARAMETER_TEMPLATE_KEYWORD(group_type)
|
||||
BOOST_PARAMETER_TEMPLATE_KEYWORD(group_compare_type)
|
||||
@@ -51,11 +49,7 @@ namespace boost
|
||||
} // namespace keywords
|
||||
|
||||
template <
|
||||
#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
typename A0,
|
||||
#else
|
||||
typename Signature,
|
||||
#endif
|
||||
typename A1 = parameter::void_,
|
||||
typename A2 = parameter::void_,
|
||||
typename A3 = parameter::void_,
|
||||
@@ -66,9 +60,7 @@ namespace boost
|
||||
class signal_type
|
||||
{
|
||||
typedef parameter::parameters<
|
||||
#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
parameter::required<keywords::tag::signature_type, is_function<boost::mpl::_> >,
|
||||
#endif
|
||||
parameter::optional<keywords::tag::combiner_type>,
|
||||
parameter::optional<keywords::tag::group_type>,
|
||||
parameter::optional<keywords::tag::group_compare_type>,
|
||||
@@ -79,20 +71,11 @@ namespace boost
|
||||
|
||||
public:
|
||||
// ArgumentPack
|
||||
typedef typename
|
||||
parameter_spec::bind<
|
||||
#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
A0,
|
||||
#endif
|
||||
A1, A2, A3, A4, A5, A6>::type
|
||||
typedef typename parameter_spec::bind<A0, A1, A2, A3, A4, A5, A6>::type
|
||||
args;
|
||||
|
||||
#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
|
||||
typedef typename parameter::value_type<args, keywords::tag::signature_type>::type
|
||||
signature_type;
|
||||
#else
|
||||
typedef Signature signature_type;
|
||||
#endif
|
||||
|
||||
typedef typename parameter::value_type
|
||||
<
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#ifndef BOOST_SIGNALS2_SLOT_HPP
|
||||
#define BOOST_SIGNALS2_SLOT_HPP
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/signals2/detail/signals_common.hpp>
|
||||
#include <boost/signals2/detail/signals_common_macros.hpp>
|
||||
#include <boost/signals2/detail/tracked_objects_visitor.hpp>
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
#ifndef BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
|
||||
#define BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
|
||||
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/preprocessor/control/expr_if.hpp>
|
||||
#include <boost/signals2/detail/variadic_arg_type.hpp>
|
||||
#include <boost/signals2/detail/variadic_slot_invoker.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/type_traits/function_traits.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user