update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -31,7 +31,7 @@ class event_base;
template< class MostDerived,
class InitialState,
class Scheduler = fifo_scheduler<>,
class Allocator = std::allocator< void >,
class Allocator = std::allocator< none >,
class ExceptionTranslator = null_exception_translator >
class asynchronous_state_machine : public state_machine<
MostDerived, InitialState, Allocator, ExceptionTranslator >,

View File

@@ -14,18 +14,31 @@
#include <boost/detail/allocator_utilities.hpp>
#include <cstddef> // std::size_t
#include <memory> // std::allocator_traits
namespace boost
{
namespace statechart
{
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef void none;
#else
// The specialization std::allocator<void> doesn't satisfy C++17's
// allocator completeness requirements. Therefore it is deprecated
// and should no longer be used. Supply a replacement type for all
// the allocator default template arguments in the library.
struct none {};
#endif
namespace detail
{
// defect: 'allocate' and 'deallocate' cannot handle stateful allocators!
template< class MostDerived, class Allocator >
void * allocate( std::size_t size )
{
@@ -48,17 +61,31 @@ void * allocate( std::size_t size )
// // Above the most-derived type being constructed is B, but A was passed
// // as the most-derived type to event<>.
BOOST_ASSERT( size == sizeof( MostDerived ) );
return typename boost::detail::allocator::rebind_to<
typedef typename boost::detail::allocator::rebind_to<
Allocator, MostDerived
>::type().allocate( 1, static_cast< MostDerived * >( 0 ) );
>::type md_allocator;
md_allocator alloc;
#ifdef BOOST_NO_CXX11_ALLOCATOR
return alloc.allocate( 1, static_cast< MostDerived * >( 0 ) );
#else
typedef std::allocator_traits<md_allocator> md_traits;
return md_traits::allocate( alloc, 1, static_cast< MostDerived * >( 0 ) );
#endif
}
template< class MostDerived, class Allocator >
void deallocate( void * pObject )
{
return typename boost::detail::allocator::rebind_to<
typedef typename boost::detail::allocator::rebind_to<
Allocator, MostDerived
>::type().deallocate( static_cast< MostDerived * >( pObject ), 1 );
>::type md_allocator;
md_allocator alloc;
#ifdef BOOST_NO_CXX11_ALLOCATOR
alloc.deallocate( static_cast< MostDerived * >( pObject ), 1 );
#else
typedef std::allocator_traits<md_allocator> md_traits;
md_traits::deallocate( alloc, static_cast< MostDerived * >( pObject ), 1 );
#endif
}

View File

@@ -57,7 +57,7 @@ struct rtti_policy
bool operator==( id_type right ) const
{
return id_ == right.id_ != 0;
return ( id_ == right.id_ ) != 0;
}
bool operator!=( id_type right ) const { return !( *this == right ); }

View File

@@ -26,7 +26,7 @@ namespace statechart
//////////////////////////////////////////////////////////////////////////////
template< class MostDerived, class Allocator = std::allocator< void > >
template< class MostDerived, class Allocator = std::allocator< none > >
class event : public detail::rtti_policy::rtti_derived_type<
MostDerived, event_base >
{

View File

@@ -28,7 +28,7 @@ namespace statechart
//////////////////////////////////////////////////////////////////////////////
template<
class FifoWorker = fifo_worker<>,
class Allocator = std::allocator< void > >
class Allocator = std::allocator< none > >
class fifo_scheduler : noncopyable
{
typedef processor_container<

View File

@@ -52,7 +52,7 @@ namespace statechart
template< class Allocator = std::allocator< void > >
template< class Allocator = std::allocator< none > >
class fifo_worker : noncopyable
{
public:

View File

@@ -24,7 +24,7 @@
#include <boost/detail/allocator_utilities.hpp>
#include <set>
#include <memory> // std::allocator, std::auto_ptr
#include <memory> // std::allocator, std::unique_ptr
@@ -60,11 +60,15 @@ namespace detail
template<
class Scheduler,
class WorkItem,
class Allocator = std::allocator< void > >
class Allocator = std::allocator< none > >
class processor_container : noncopyable
{
typedef event_processor< Scheduler > processor_base_type;
#ifdef BOOST_NO_AUTO_PTR
typedef std::unique_ptr< processor_base_type > processor_holder_type;
#else
typedef std::auto_ptr< processor_base_type > processor_holder_type;
#endif
typedef shared_ptr< processor_holder_type > processor_holder_ptr_type;
public:
@@ -308,8 +312,7 @@ class processor_container : noncopyable
const processor_context & context )
{
processorSet_.insert( pProcessor );
processor_holder_type holder( new Processor( context ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context ) );
}
template< class Processor, typename Arg1 >
@@ -318,8 +321,7 @@ class processor_container : noncopyable
const processor_context & context, Arg1 arg1 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder( new Processor( context, arg1 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1 ) );
}
template< class Processor, typename Arg1, typename Arg2 >
@@ -328,8 +330,7 @@ class processor_container : noncopyable
const processor_context & context, Arg1 arg1, Arg2 arg2 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder( new Processor( context, arg1, arg2 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1, arg2 ) );
}
template< class Processor, typename Arg1, typename Arg2, typename Arg3 >
@@ -338,9 +339,7 @@ class processor_container : noncopyable
const processor_context & context, Arg1 arg1, Arg2 arg2, Arg3 arg3 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder(
new Processor( context, arg1, arg2, arg3 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1, arg2, arg3 ) );
}
template<
@@ -352,9 +351,7 @@ class processor_container : noncopyable
Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder(
new Processor( context, arg1, arg2, arg3, arg4 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1, arg2, arg3, arg4 ) );
}
template<
@@ -366,9 +363,7 @@ class processor_container : noncopyable
Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder(
new Processor( context, arg1, arg2, arg3, arg4, arg5 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1, arg2, arg3, arg4, arg5 ) );
}
template<
@@ -380,9 +375,7 @@ class processor_container : noncopyable
Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6 )
{
processorSet_.insert( pProcessor );
processor_holder_type holder(
new Processor( context, arg1, arg2, arg3, arg4, arg5, arg6 ) );
*pProcessor = holder;
*pProcessor = processor_holder_type( new Processor( context, arg1, arg2, arg3, arg4, arg5, arg6 ) );
}
void destroy_processor_impl( const processor_handle & processor )

View File

@@ -230,7 +230,7 @@ class history_key
//////////////////////////////////////////////////////////////////////////////
template< class MostDerived,
class InitialState,
class Allocator = std::allocator< void >,
class Allocator = std::allocator< none >,
class ExceptionTranslator = null_exception_translator >
class state_machine : noncopyable
{