Updated Boost libraries to version 1.49, and recompiled them with NDK r8d
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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)
|
||||
@@ -998,7 +998,7 @@ public:
|
||||
const composite_key_result<CompositeKey>& x,
|
||||
const Value& y)const
|
||||
{
|
||||
return operator()(x,make_tuple(cref(y)));
|
||||
return operator()(x,boost::make_tuple(boost::cref(y)));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1033,7 +1033,7 @@ public:
|
||||
const Value& x,
|
||||
const composite_key_result<CompositeKey>& y)const
|
||||
{
|
||||
return operator()(make_tuple(cref(x)),y);
|
||||
return operator()(boost::make_tuple(boost::cref(x)),y);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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,6 +13,8 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace multi_index{
|
||||
@@ -24,12 +26,10 @@ namespace detail{
|
||||
* 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.cuj.com/documents/s=8000/cujcexp1812alexandr/
|
||||
* 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.
|
||||
* - safe_execute does not feature a try-catch protection, so we can
|
||||
* use this even if BOOST_NO_EXCEPTIONS is defined.
|
||||
* - Added scope_guard_impl4 and obj_scope_guard_impl3, (Boost.MultiIndex
|
||||
* needs them). A better design would provide guards for many more
|
||||
* arguments through the Boost Preprocessor Library.
|
||||
@@ -42,6 +42,18 @@ namespace detail{
|
||||
*
|
||||
* NB: CodeWarrior Pro 8 seems to have problems looking up safe_execute
|
||||
* without an explicit qualification.
|
||||
*
|
||||
* We also define the following variants of the idiom:
|
||||
*
|
||||
* - make_guard_if_c<bool>( ... )
|
||||
* - make_guard_if<IntegralConstant>( ... )
|
||||
* - make_obj_guard_if_c<bool>( ... )
|
||||
* - make_obj_guard_if<IntegralConstant>( ... )
|
||||
* which may be used with a compile-time constant to yield
|
||||
* a "null_guard" if the boolean compile-time parameter is false,
|
||||
* or conversely, the guard is only constructed if the constant is true.
|
||||
* This is useful to avoid extra tagging, because the returned
|
||||
* null_guard can be optimzed comlpetely away by the compiler.
|
||||
*/
|
||||
|
||||
class scope_guard_impl_base
|
||||
@@ -65,7 +77,13 @@ protected:
|
||||
}
|
||||
|
||||
template<typename J>
|
||||
static void safe_execute(J& j){if(!j.dismissed_)j.execute();}
|
||||
static void safe_execute(J& j){
|
||||
BOOST_TRY{
|
||||
if(!j.dismissed_)j.execute();
|
||||
}
|
||||
BOOST_CATCH(...){}
|
||||
BOOST_CATCH_END
|
||||
}
|
||||
|
||||
mutable bool dismissed_;
|
||||
|
||||
@@ -75,6 +93,35 @@ private:
|
||||
|
||||
typedef const scope_guard_impl_base& scope_guard;
|
||||
|
||||
struct null_guard : public scope_guard_impl_base
|
||||
{
|
||||
template< class T1 >
|
||||
null_guard( const T1& )
|
||||
{ }
|
||||
|
||||
template< class T1, class T2 >
|
||||
null_guard( const T1&, const T2& )
|
||||
{ }
|
||||
|
||||
template< class T1, class T2, class T3 >
|
||||
null_guard( const T1&, const T2&, const T3& )
|
||||
{ }
|
||||
|
||||
template< class T1, class T2, class T3, class T4 >
|
||||
null_guard( const T1&, const T2&, const T3&, const T4& )
|
||||
{ }
|
||||
|
||||
template< class T1, class T2, class T3, class T4, class T5 >
|
||||
null_guard( const T1&, const T2&, const T3&, const T4&, const T5& )
|
||||
{ }
|
||||
};
|
||||
|
||||
template< bool cond, class T >
|
||||
struct null_guard_return
|
||||
{
|
||||
typedef typename boost::mpl::if_c<cond,T,null_guard>::type type;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
class scope_guard_impl0:public scope_guard_impl_base
|
||||
{
|
||||
@@ -94,6 +141,20 @@ inline scope_guard_impl0<F> make_guard(F fun)
|
||||
return scope_guard_impl0<F>(fun);
|
||||
}
|
||||
|
||||
template<bool cond, typename F>
|
||||
inline typename null_guard_return<cond,scope_guard_impl0<F> >::type
|
||||
make_guard_if_c(F fun)
|
||||
{
|
||||
return typename null_guard_return<cond,scope_guard_impl0<F> >::type(fun);
|
||||
}
|
||||
|
||||
template<typename C, typename F>
|
||||
inline typename null_guard_return<C::value,scope_guard_impl0<F> >::type
|
||||
make_guard_if(F fun)
|
||||
{
|
||||
return make_guard_if<C::value>(fun);
|
||||
}
|
||||
|
||||
template<typename F,typename P1>
|
||||
class scope_guard_impl1:public scope_guard_impl_base
|
||||
{
|
||||
@@ -113,6 +174,20 @@ inline scope_guard_impl1<F,P1> make_guard(F fun,P1 p1)
|
||||
return scope_guard_impl1<F,P1>(fun,p1);
|
||||
}
|
||||
|
||||
template<bool cond, typename F,typename P1>
|
||||
inline typename null_guard_return<cond,scope_guard_impl1<F,P1> >::type
|
||||
make_guard_if_c(F fun,P1 p1)
|
||||
{
|
||||
return typename null_guard_return<cond,scope_guard_impl1<F,P1> >::type(fun,p1);
|
||||
}
|
||||
|
||||
template<typename C, typename F,typename P1>
|
||||
inline typename null_guard_return<C::value,scope_guard_impl1<F,P1> >::type
|
||||
make_guard_if(F fun,P1 p1)
|
||||
{
|
||||
return make_guard_if_c<C::value>(fun,p1);
|
||||
}
|
||||
|
||||
template<typename F,typename P1,typename P2>
|
||||
class scope_guard_impl2:public scope_guard_impl_base
|
||||
{
|
||||
@@ -133,6 +208,20 @@ inline scope_guard_impl2<F,P1,P2> make_guard(F fun,P1 p1,P2 p2)
|
||||
return scope_guard_impl2<F,P1,P2>(fun,p1,p2);
|
||||
}
|
||||
|
||||
template<bool cond, typename F,typename P1,typename P2>
|
||||
inline typename null_guard_return<cond,scope_guard_impl2<F,P1,P2> >::type
|
||||
make_guard_if_c(F fun,P1 p1,P2 p2)
|
||||
{
|
||||
return typename null_guard_return<cond,scope_guard_impl2<F,P1,P2> >::type(fun,p1,p2);
|
||||
}
|
||||
|
||||
template<typename C, typename F,typename P1,typename P2>
|
||||
inline typename null_guard_return<C::value,scope_guard_impl2<F,P1,P2> >::type
|
||||
make_guard_if(F fun,P1 p1,P2 p2)
|
||||
{
|
||||
return make_guard_if_c<C::value>(fun,p1,p2);
|
||||
}
|
||||
|
||||
template<typename F,typename P1,typename P2,typename P3>
|
||||
class scope_guard_impl3:public scope_guard_impl_base
|
||||
{
|
||||
@@ -154,6 +243,20 @@ inline scope_guard_impl3<F,P1,P2,P3> make_guard(F fun,P1 p1,P2 p2,P3 p3)
|
||||
return scope_guard_impl3<F,P1,P2,P3>(fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
template<bool cond,typename F,typename P1,typename P2,typename P3>
|
||||
inline typename null_guard_return<cond,scope_guard_impl3<F,P1,P2,P3> >::type
|
||||
make_guard_if_c(F fun,P1 p1,P2 p2,P3 p3)
|
||||
{
|
||||
return typename null_guard_return<cond,scope_guard_impl3<F,P1,P2,P3> >::type(fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
template<typename C,typename F,typename P1,typename P2,typename P3>
|
||||
inline typename null_guard_return< C::value,scope_guard_impl3<F,P1,P2,P3> >::type
|
||||
make_guard_if(F fun,P1 p1,P2 p2,P3 p3)
|
||||
{
|
||||
return make_guard_if_c<C::value>(fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
template<typename F,typename P1,typename P2,typename P3,typename P4>
|
||||
class scope_guard_impl4:public scope_guard_impl_base
|
||||
{
|
||||
@@ -178,6 +281,22 @@ inline scope_guard_impl4<F,P1,P2,P3,P4> make_guard(
|
||||
return scope_guard_impl4<F,P1,P2,P3,P4>(fun,p1,p2,p3,p4);
|
||||
}
|
||||
|
||||
template<bool cond, typename F,typename P1,typename P2,typename P3,typename P4>
|
||||
inline typename null_guard_return<cond,scope_guard_impl4<F,P1,P2,P3,P4> >::type
|
||||
make_guard_if_c(
|
||||
F fun,P1 p1,P2 p2,P3 p3,P4 p4)
|
||||
{
|
||||
return typename null_guard_return<cond,scope_guard_impl4<F,P1,P2,P3,P4> >::type(fun,p1,p2,p3,p4);
|
||||
}
|
||||
|
||||
template<typename C, typename F,typename P1,typename P2,typename P3,typename P4>
|
||||
inline typename null_guard_return<C::value,scope_guard_impl4<F,P1,P2,P3,P4> >::type
|
||||
make_guard_if(
|
||||
F fun,P1 p1,P2 p2,P3 p3,P4 p4)
|
||||
{
|
||||
return make_guard_if_c<C::value>(fun,p1,p2,p3,p4);
|
||||
}
|
||||
|
||||
template<class Obj,typename MemFun>
|
||||
class obj_scope_guard_impl0:public scope_guard_impl_base
|
||||
{
|
||||
@@ -197,6 +316,20 @@ inline obj_scope_guard_impl0<Obj,MemFun> make_obj_guard(Obj& obj,MemFun mem_fun)
|
||||
return obj_scope_guard_impl0<Obj,MemFun>(obj,mem_fun);
|
||||
}
|
||||
|
||||
template<bool cond, class Obj,typename MemFun>
|
||||
inline typename null_guard_return<cond,obj_scope_guard_impl0<Obj,MemFun> >::type
|
||||
make_obj_guard_if_c(Obj& obj,MemFun mem_fun)
|
||||
{
|
||||
return typename null_guard_return<cond,obj_scope_guard_impl0<Obj,MemFun> >::type(obj,mem_fun);
|
||||
}
|
||||
|
||||
template<typename C, class Obj,typename MemFun>
|
||||
inline typename null_guard_return<C::value,obj_scope_guard_impl0<Obj,MemFun> >::type
|
||||
make_obj_guard_if(Obj& obj,MemFun mem_fun)
|
||||
{
|
||||
return make_obj_guard_if_c<C::value>(obj,mem_fun);
|
||||
}
|
||||
|
||||
template<class Obj,typename MemFun,typename P1>
|
||||
class obj_scope_guard_impl1:public scope_guard_impl_base
|
||||
{
|
||||
@@ -219,6 +352,20 @@ inline obj_scope_guard_impl1<Obj,MemFun,P1> make_obj_guard(
|
||||
return obj_scope_guard_impl1<Obj,MemFun,P1>(obj,mem_fun,p1);
|
||||
}
|
||||
|
||||
template<bool cond, class Obj,typename MemFun,typename P1>
|
||||
inline typename null_guard_return<cond,obj_scope_guard_impl1<Obj,MemFun,P1> >::type
|
||||
make_obj_guard_if_c( Obj& obj,MemFun mem_fun,P1 p1)
|
||||
{
|
||||
return typename null_guard_return<cond,obj_scope_guard_impl1<Obj,MemFun,P1> >::type(obj,mem_fun,p1);
|
||||
}
|
||||
|
||||
template<typename C, class Obj,typename MemFun,typename P1>
|
||||
inline typename null_guard_return<C::value,obj_scope_guard_impl1<Obj,MemFun,P1> >::type
|
||||
make_obj_guard_if( Obj& obj,MemFun mem_fun,P1 p1)
|
||||
{
|
||||
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1);
|
||||
}
|
||||
|
||||
template<class Obj,typename MemFun,typename P1,typename P2>
|
||||
class obj_scope_guard_impl2:public scope_guard_impl_base
|
||||
{
|
||||
@@ -243,6 +390,20 @@ 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);
|
||||
}
|
||||
|
||||
template<bool cond, class Obj,typename MemFun,typename P1,typename P2>
|
||||
inline typename null_guard_return<cond,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type
|
||||
make_obj_guard_if_c(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
|
||||
{
|
||||
return typename null_guard_return<cond,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type(obj,mem_fun,p1,p2);
|
||||
}
|
||||
|
||||
template<typename C, class Obj,typename MemFun,typename P1,typename P2>
|
||||
inline typename null_guard_return<C::value,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type
|
||||
make_obj_guard_if(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
|
||||
{
|
||||
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2);
|
||||
}
|
||||
|
||||
template<class Obj,typename MemFun,typename P1,typename P2,typename P3>
|
||||
class obj_scope_guard_impl3:public scope_guard_impl_base
|
||||
{
|
||||
@@ -268,6 +429,20 @@ make_obj_guard(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
|
||||
return obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3>(obj,mem_fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
template<bool cond, class Obj,typename MemFun,typename P1,typename P2,typename P3>
|
||||
inline typename null_guard_return<cond,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type
|
||||
make_obj_guard_if_c(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
|
||||
{
|
||||
return typename null_guard_return<cond,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type(obj,mem_fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
template<typename C, class Obj,typename MemFun,typename P1,typename P2,typename P3>
|
||||
inline typename null_guard_return<C::value,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type
|
||||
make_obj_guard_if(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
|
||||
{
|
||||
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2,p3);
|
||||
}
|
||||
|
||||
} /* namespace multi_index::detail */
|
||||
|
||||
} /* namespace multi_index */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2010 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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)
|
||||
@@ -19,7 +19,9 @@
|
||||
#include <boost/detail/allocator_utilities.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/foreach_fwd.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/multi_index/detail/access_specifier.hpp>
|
||||
#include <boost/multi_index/detail/auto_space.hpp>
|
||||
@@ -605,7 +607,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
|
||||
hash(tuples::get<2>(args_list.get_head())),
|
||||
eq(tuples::get<3>(args_list.get_head())),
|
||||
buckets(al,header()->impl(),tuples::get<0>(args_list.get_head())),
|
||||
mlf(1.0),
|
||||
mlf(1.0f),
|
||||
first_bucket(buckets.size())
|
||||
{
|
||||
calculate_max_load();
|
||||
@@ -1240,6 +1242,20 @@ struct hashed_non_unique
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
/* Boost.Foreach compatibility */
|
||||
|
||||
template<
|
||||
typename KeyFromValue,typename Hash,typename Pred,
|
||||
typename SuperMeta,typename TagList,typename Category
|
||||
>
|
||||
inline boost::mpl::true_* boost_foreach_is_noncopyable(
|
||||
boost::multi_index::detail::hashed_index<
|
||||
KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>*&,
|
||||
boost::foreach::tag)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2010 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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)
|
||||
@@ -45,7 +45,9 @@
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/foreach_fwd.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/multi_index/detail/access_specifier.hpp>
|
||||
@@ -1385,6 +1387,20 @@ struct ordered_non_unique
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
/* Boost.Foreach compatibility */
|
||||
|
||||
template<
|
||||
typename KeyFromValue,typename Compare,
|
||||
typename SuperMeta,typename TagList,typename Category
|
||||
>
|
||||
inline boost::mpl::true_* boost_foreach_is_noncopyable(
|
||||
boost::multi_index::detail::ordered_index<
|
||||
KeyFromValue,Compare,SuperMeta,TagList,Category>*&,
|
||||
boost::foreach::tag)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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)
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/foreach_fwd.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
@@ -1003,6 +1004,16 @@ struct random_access
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
/* Boost.Foreach compatibility */
|
||||
|
||||
template<typename SuperMeta,typename TagList>
|
||||
inline boost::mpl::true_* boost_foreach_is_noncopyable(
|
||||
boost::multi_index::detail::random_access_index<SuperMeta,TagList>*&,
|
||||
boost::foreach::tag)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2011 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)
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <boost/detail/allocator_utilities.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/foreach_fwd.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
@@ -917,6 +918,16 @@ struct sequenced
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
/* Boost.Foreach compatibility */
|
||||
|
||||
template<typename SuperMeta,typename TagList>
|
||||
inline boost::mpl::true_* boost_foreach_is_noncopyable(
|
||||
boost::multi_index::detail::sequenced_index<SuperMeta,TagList>*&,
|
||||
boost::foreach::tag)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user