update boost
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2014 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2020 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -14,9 +14,9 @@
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/serialization/serialization.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
|
||||
@@ -34,7 +34,7 @@ struct archive_constructed:private noncopyable
|
||||
template<class Archive>
|
||||
archive_constructed(Archive& ar,const unsigned int version)
|
||||
{
|
||||
serialization::load_construct_data_adl(ar,&get(),version);
|
||||
core::load_construct_data_adl(ar,&get(),version);
|
||||
BOOST_TRY{
|
||||
ar>>get();
|
||||
}
|
||||
@@ -48,7 +48,7 @@ struct archive_constructed:private noncopyable
|
||||
template<class Archive>
|
||||
archive_constructed(const char* name,Archive& ar,const unsigned int version)
|
||||
{
|
||||
serialization::load_construct_data_adl(ar,&get(),version);
|
||||
core::load_construct_data_adl(ar,&get(),version);
|
||||
BOOST_TRY{
|
||||
ar>>serialization::make_nvp(name,get());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2014 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2019 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,10 +39,9 @@ struct default_value_policy:value_marker
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)&&\
|
||||
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)&&\
|
||||
BOOST_WORKAROUND(__GNUC__,<=4)&&(__GNUC__<4||__GNUC_MINOR__<=4)
|
||||
|
||||
/* GCC 4.4.2 (and probably prior) bug: the default ctor generated by the
|
||||
* variadic temmplate ctor below fails to value-initialize x.
|
||||
BOOST_WORKAROUND(BOOST_GCC,<=40603)
|
||||
/* GCC bug: the default ctor generated by the variadic template ctor below
|
||||
* fails to value-initialize x.
|
||||
*/
|
||||
|
||||
rep_type():x(){}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2018 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2020 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -14,7 +14,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/flyweight/detail/perfect_fwd.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2013 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2023 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -13,30 +13,53 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Recursive lightweight mutex. Relies entirely on
|
||||
* boost::detail::lightweight_mutex, except in Pthreads, where we
|
||||
* explicitly use the PTHREAD_MUTEX_RECURSIVE attribute
|
||||
* (lightweight_mutex uses the default mutex type instead).
|
||||
/* Recursive lightweight mutex.
|
||||
* - If <mutex> is provided, it uses std::recursive_mutex.
|
||||
* - Else if Pthreads is available, it uses a Pthreads mutex with
|
||||
* PTHREAD_MUTEX_RECURSIVE attribute.
|
||||
* - Else if on Windows/Cygwin, it relies on boost::detail::lightweight_mutex
|
||||
* for an implementation based on (recursive) Win32 CRITICAL_SECTION.
|
||||
* - Else, it provides a dummy implementation.
|
||||
*/
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_HAS_PTHREADS)
|
||||
#include <boost/detail/lightweight_mutex.hpp>
|
||||
#if !defined(BOOST_NO_CXX11_HDR_MUTEX)
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <mutex>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace flyweights{
|
||||
|
||||
namespace detail{
|
||||
|
||||
typedef boost::detail::lightweight_mutex recursive_lightweight_mutex;
|
||||
struct recursive_lightweight_mutex:noncopyable
|
||||
{
|
||||
recursive_lightweight_mutex(){}
|
||||
|
||||
struct scoped_lock;
|
||||
friend struct scoped_lock;
|
||||
struct scoped_lock:noncopyable
|
||||
{
|
||||
public:
|
||||
scoped_lock(recursive_lightweight_mutex& m):m_(m.m_){m_.lock();}
|
||||
~scoped_lock(){m_.unlock();}
|
||||
|
||||
private:
|
||||
std::recursive_mutex& m_;
|
||||
};
|
||||
|
||||
private:
|
||||
std::recursive_mutex m_;
|
||||
};
|
||||
|
||||
} /* namespace flyweights::detail */
|
||||
|
||||
} /* namespace flyweights */
|
||||
|
||||
} /* namespace boost */
|
||||
#else
|
||||
#elif defined(BOOST_HAS_PTHREADS)
|
||||
/* code shamelessly ripped from <boost/detail/lwm_pthreads.hpp> */
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
@@ -86,6 +109,39 @@ private:
|
||||
|
||||
} /* namespace flyweights */
|
||||
|
||||
} /* namespace boost */
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace flyweights{
|
||||
|
||||
namespace detail{
|
||||
|
||||
typedef boost::detail::lightweight_mutex recursive_lightweight_mutex;
|
||||
|
||||
} /* namespace flyweights::detail */
|
||||
|
||||
} /* namespace flyweights */
|
||||
|
||||
} /* namespace boost */
|
||||
#else
|
||||
namespace boost{
|
||||
|
||||
namespace flyweights{
|
||||
|
||||
namespace detail{
|
||||
|
||||
struct recursive_lightweight_mutex
|
||||
{
|
||||
typedef recursive_lightweight_mutex scoped_lock;
|
||||
};
|
||||
|
||||
} /* namespace flyweights::detail */
|
||||
|
||||
} /* namespace flyweights */
|
||||
|
||||
} /* namespace boost */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <boost/multi_index/hashed_index.hpp>
|
||||
#include <boost/multi_index/random_access_index.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/serialization/extended_type_info.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace boost{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Flyweight class.
|
||||
*
|
||||
* Copyright 2006-2015 Joaquin M Lopez Munoz.
|
||||
* Copyright 2006-2023 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <algorithm>
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/flyweight/detail/default_value_policy.hpp>
|
||||
#include <boost/flyweight/detail/flyweight_core.hpp>
|
||||
@@ -37,10 +39,9 @@
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/parameter/binding.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/utility/swap.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE)&&!defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
@@ -241,7 +242,9 @@ public:
|
||||
|
||||
const key_type& get_key()const{return core::key(h);}
|
||||
const value_type& get()const{return core::value(h);}
|
||||
const value_type& operator*()const{return get();}
|
||||
operator const value_type&()const{return get();}
|
||||
const value_type* operator->()const{return boost::addressof(get());}
|
||||
|
||||
/* exact type equality */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2014 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2022 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <algorithm>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/detail/atomic_count.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/flyweight/refcounted_fwd.hpp>
|
||||
#include <boost/flyweight/tracking_tag.hpp>
|
||||
#include <boost/utility/swap.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
#include <utility>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2006-2015 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2006-2023 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -17,17 +17,17 @@
|
||||
#include <boost/flyweight/flyweight_fwd.hpp>
|
||||
#include <boost/flyweight/detail/archive_constructed.hpp>
|
||||
#include <boost/flyweight/detail/serialization_helper.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
/* Serialization routines for flyweight<T>.
|
||||
*/
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace serialization{
|
||||
|
||||
namespace flyweights{
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
@@ -37,7 +37,7 @@ inline void serialize(
|
||||
Archive& ar,::boost::flyweights::flyweight<T,Arg1,Arg2,Arg3>& f,
|
||||
const unsigned int version)
|
||||
{
|
||||
split_free(ar,f,version);
|
||||
core::split_free(ar,f,version);
|
||||
}
|
||||
|
||||
template<
|
||||
@@ -80,8 +80,7 @@ void load(
|
||||
size_type n=0;
|
||||
ar>>make_nvp("item",n);
|
||||
if(n>hlp.size()){
|
||||
throw_exception(
|
||||
archive::archive_exception(archive::archive_exception::other_exception));
|
||||
throw_exception(std::runtime_error("Invalid or corrupted archive"));
|
||||
}
|
||||
else if(n==hlp.size()){
|
||||
::boost::flyweights::detail::archive_constructed<key_type> k(
|
||||
@@ -91,7 +90,7 @@ void load(
|
||||
f=hlp[n];
|
||||
}
|
||||
|
||||
} /* namespace serialization */
|
||||
} /* namespace flyweights */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user