update boost
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user