diff options
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/phoenix')
58 files changed, 4779 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp new file mode 100644 index 0000000..5a90d44 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_BIND_HPP +#define PHOENIX_BIND_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/bind/bind_function.hpp> +#include <boost/spirit/home/phoenix/bind/bind_function_object.hpp> +#include <boost/spirit/home/phoenix/bind/bind_member_function.hpp> +#include <boost/spirit/home/phoenix/bind/bind_member_variable.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp new file mode 100644 index 0000000..9121fdc --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_BIND_BIND_FUNCTION_HPP +#define PHOENIX_BIND_BIND_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/spirit/home/phoenix/bind/detail/function_ptr.hpp> + +namespace boost { namespace phoenix +{ + template <typename RT> + inline actor< + typename as_composite< + detail::function_eval<0> + , detail::function_ptr<0, RT, RT(*)()> + >::type> + bind(RT(*f)()) + { + typedef detail::function_ptr<0, RT, RT(*)()> fp_type; + return compose<detail::function_eval<0> >(fp_type(f)); + } + + template <typename RT, typename T0, typename A0> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::function_ptr<1, RT, RT(*)(T0)> + , A0 + >::type> + bind(RT(*f)(T0), A0 const& _0) + { + typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), _0); + } + + template <typename RT, typename T0, typename T1, typename A0, typename A1> + inline actor< + typename as_composite< + detail::function_eval<2> + , detail::function_ptr<2, RT, RT(*)(T0, T1)> + , A0, A1 + >::type> + bind(RT(*f)(T0, T1), A0 const& _0, A1 const& _1) + { + typedef detail::function_ptr<2, RT, RT(*)(T0, T1)> fp_type; + return compose<detail::function_eval<2> >(fp_type(f), _0, _1); + } + + // Bring in the rest of the function binders + #include <boost/spirit/home/phoenix/bind/detail/bind_function.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp new file mode 100644 index 0000000..752ae31 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP +#define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> + +namespace boost { namespace phoenix +{ + template <typename F> + inline actor<typename as_composite<detail::function_eval<0>, F>::type> + bind(F const& f) + { + return compose<detail::function_eval<0> >(f); + } + + template <typename F, typename A0> + inline actor<typename as_composite<detail::function_eval<1>, F, A0>::type> + bind(F const& f, A0 const& _0) + { + return compose<detail::function_eval<1> >(f, _0); + } + + template <typename F, typename A0, typename A1> + inline actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type> + bind(F const& f, A0 const& _0, A1 const& _1) + { + return compose<detail::function_eval<2> >(f, _0, _1); + } + + // Bring in the rest of the function object binders + #include <boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp new file mode 100644 index 0000000..9d31a38 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP +#define PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp> + +namespace boost { namespace phoenix +{ + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)()> + , ClassA + >::type> + bind(RT(ClassT::*f)(), ClassA const& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), obj); + } + + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> + , ClassA + >::type> + bind(RT(ClassT::*f)() const, ClassA const& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), obj); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)()> + , actor<reference<ClassT> > + >::type> + bind(RT(ClassT::*f)(), ClassT& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; + return compose<detail::function_eval<1> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> + , actor<reference<ClassT> > + >::type> + bind(RT(ClassT::*f)() const, ClassT& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; + return compose<detail::function_eval<1> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } + + // Bring in the rest of the function binders + #include <boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp new file mode 100644 index 0000000..3d11351 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP +#define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP + +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/remove_reference.hpp> + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/remove_reference.hpp> + +namespace boost { namespace phoenix +{ + namespace detail + { + template <typename RT, typename MP> + struct member_variable + { + template <typename Class> + struct result + { + typedef typename boost::mpl::if_< + boost::is_const< + typename boost::remove_pointer< + typename boost::remove_reference<Class>::type + >::type + > + , const RT& + , RT& + >::type type; + }; + + member_variable(MP mp) + : mp(mp) {} + + template <typename Class> + RT& operator()(Class& obj) const + { + return obj.*mp; + } + + template <typename Class> + RT& operator()(Class* obj) const + { + return obj->*mp; + } + + template <typename Class> + RT const& operator()(Class const& obj) const + { + return obj.*mp; + } + + template <typename Class> + RT const& operator()(Class const* obj) const + { + return obj->*mp; + } + + MP mp; + }; + } + + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_variable<RT, RT ClassT::*> + , ClassA + >::type> + bind(RT ClassT::*mp, ClassA const& obj) + { + typedef detail::member_variable<RT, RT ClassT::*> mp_type; + return compose<detail::function_eval<1> >(mp_type(mp), obj); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_variable<RT, RT ClassT::*> + , actor<reference<ClassT> > + >::type> + bind(RT ClassT::*mp, ClassT& obj) + { + typedef detail::member_variable<RT, RT ClassT::*> mp_type; + return compose<detail::function_eval<1> >( + mp_type(mp) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp new file mode 100644 index 0000000..8d6340d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_FUNCTION_HPP) +#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/bind/detail/bind_function.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename RT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<N> + , detail::function_ptr<N, RT, RT(*)(BOOST_PP_ENUM_PARAMS(N, T))> + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind(RT(*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::function_ptr< + N, RT, RT(*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<N> >( + fp_type(f), BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp new file mode 100644 index 0000000..4e4984d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP) +#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor<typename as_composite<detail::function_eval<N>, F + , BOOST_PP_ENUM_PARAMS(N, A)>::type> + bind(F const& f, BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp new file mode 100644 index 0000000..315f56f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp @@ -0,0 +1,132 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP) +#define PHOENIX_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)), \ + "boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , typename ClassA + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> + , ClassA, BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , ClassA const& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , typename ClassA + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> + , ClassA, BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const + , ClassA const& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> + , actor<reference<ClassT> > + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , ClassT& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj)) + , BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> + , actor<reference<ClassT> > + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const + , ClassT& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj)) + , BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp new file mode 100644 index 0000000..a2352cd --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP) +#define PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/dec.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct function_ptr_impl + { + template <typename RT, typename FP> + struct impl; + }; + + template <int N, typename RT, typename FP> + struct function_ptr : function_ptr_impl<N>::template impl<RT, FP> + { + typedef typename function_ptr_impl<N>::template impl<RT, FP> base; + function_ptr(FP fp) + : base(fp) {} + }; + + template <> + struct function_ptr_impl<0> + { + template <typename RT, typename FP> + struct impl + { + typedef RT result_type; + + impl(FP fp) + : fp(fp) {} + + RT operator()() const + { + return fp(); + } + + FP fp; + }; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/bind/detail/function_ptr.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct function_ptr_impl<N> + { + template <typename RT, typename FP> + struct impl + { + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return fp(BOOST_PP_ENUM_PARAMS(N, _)); + } + + FP fp; + }; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp new file mode 100644 index 0000000..2c11510 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp @@ -0,0 +1,119 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP) +#define PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/utility/addressof.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct member_function_ptr_impl + { + template <typename RT, typename FP> + struct impl; + }; + + template <int N, typename RT, typename FP> + struct member_function_ptr + : member_function_ptr_impl<N>::template impl<RT, FP> + { + typedef typename member_function_ptr_impl<N>:: + template impl<RT, FP> base; + member_function_ptr(FP fp) + : base(fp) {} + }; + + template <> + struct member_function_ptr_impl<0> + { + template <typename RT, typename FP> + struct impl + { + template <typename Class> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <typename Class> + RT operator()(Class& obj) const + { + return (obj.*fp)(); + } + + template <typename Class> + RT operator()(Class* obj) const + { + return (obj->*fp)(); + } + + FP fp; + }; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct member_function_ptr_impl<N> + { + template <typename RT, typename FP> + struct impl + { + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename T)> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(Class& obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return (obj.*fp)(BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(Class* obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return (obj->*fp)(BOOST_PP_ENUM_PARAMS(N, _)); + } + + FP fp; + }; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp new file mode 100644 index 0000000..7dfefb3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp @@ -0,0 +1,23 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_HPP +#define PHOENIX_CORE_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/basic_environment.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/spirit/home/phoenix/core/is_actor.hpp> +#include <boost/spirit/home/phoenix/core/argument.hpp> +#include <boost/spirit/home/phoenix/core/value.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/nothing.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp new file mode 100644 index 0000000..6ff48e9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp @@ -0,0 +1,194 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_ACTOR_HPP +#define PHOENIX_CORE_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> + +#if !defined(BOOST_RESULT_OF_NUM_ARGS) +# define BOOST_RESULT_OF_NUM_ARGS PHOENIX_ACTOR_LIMIT +#elif (BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT) +# error "BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT" +#endif + +#include <boost/spirit/home/phoenix/core/basic_environment.hpp> +#include <boost/mpl/min.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/utility/result_of.hpp> + +namespace boost { namespace phoenix +{ + // phoenix::void_ is the same as fusion::void_ + typedef fusion::void_ void_; + + namespace detail + { + // Forward declarations. These will come in when we get to the + // operator module, yet, the actor's assignment operator and index + // operator are required to be members. + + template <typename T0, typename T1> + struct make_assign_composite; + + template <typename T0, typename T1> + struct make_index_composite; + + template <typename BaseT0, typename BaseT1> + struct comma_result; + + // error no arguments supplied + struct error_expecting_arguments + { + template <typename T> + error_expecting_arguments(T const&) {} + }; + } + + template <typename Eval, typename Env> + struct eval_result + { + typedef typename Eval::template result<Env>::type type; + }; + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4522) // multiple assignment operators specified warning +#endif + + template <typename Eval> + struct actor : Eval + { + typedef actor<Eval> self_type; + typedef Eval eval_type; + + template <class Sig> struct result {}; + + actor() + : Eval() {} + + actor(Eval const& base) + : Eval(base) {} + + template <typename T0> + explicit actor(T0 const& _0) + : Eval(_0) {} + + template <typename T0, typename T1> + actor(T0 const& _0, T1 const& _1) + : Eval(_0, _1) {} + + typedef typename + mpl::eval_if< + typename Eval::no_nullary // avoid calling eval_result when this is true + , mpl::identity<detail::error_expecting_arguments> + , eval_result<eval_type, basic_environment<> > + >::type + nullary_result; + + actor& operator=(actor const& rhs) + { + Eval::operator=(rhs); + return *this; + } + + actor& operator=(actor& rhs) + { + Eval::operator=(rhs); + return *this; + } + + nullary_result + operator()() const + { + return eval_type::eval(basic_environment<>()); + } + + template <class F, class A0> + struct result<F(A0)> + : eval_result< + eval_type + , basic_environment< + typename remove_reference<A0>::type + > + > + {}; + + template <typename T0> + typename result<actor(T0&)>::type + operator()(T0& _0) const + { + return eval_type::eval(basic_environment<T0>(_0)); + } + + template <class F, class A0, class A1> + struct result<F(A0,A1)> + : eval_result< + eval_type + , basic_environment< + typename remove_reference<A0>::type + , typename remove_reference<A1>::type + > + > + {}; + + template <typename T0, typename T1> + typename result<actor(T0&,T1&)>::type + operator()(T0& _0, T1& _1) const + { + return eval_type::eval(basic_environment<T0, T1>(_0, _1)); + } + + template <typename T1> + typename detail::make_assign_composite<self_type, T1>::type + operator=(T1 const& a1) const; + + template <typename T1> + typename detail::make_index_composite<self_type, T1>::type + operator[](T1 const& a1) const; + + // Bring in the rest of the constructors and function call operators + #include <boost/spirit/home/phoenix/core/detail/actor.hpp> + }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + // Forward declaration: The intent to overload the comma must be + // stated early on to avoid the subtle problem that arises when + // the header file where the comma operator overload is defined, + // is not included by the client and the client attempts to use + // the comma anyway. + + namespace detail + { + template <typename BaseT0, typename BaseT1> + struct comma_result; + } + + template <typename BaseT0, typename BaseT1> + typename detail::comma_result<BaseT0, BaseT1>::type + operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1); +}} + +namespace boost +{ + template <typename Eval> + struct result_of<phoenix::actor<Eval>()> + { + typedef typename phoenix::actor<Eval>::nullary_result type; + }; + + template <typename Eval> + struct result_of<phoenix::actor<Eval> const()> + : result_of<phoenix::actor<Eval>()> + {}; +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp new file mode 100644 index 0000000..1679cb2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_ARGUMENT_HPP +#define PHOENIX_CORE_ARGUMENT_HPP + +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/size.hpp> +#include <boost/type_traits/add_reference.hpp> + +#define PHOENIX_DECLARE_ARG(z, n, data) \ + typedef actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type); \ + actor<argument<n> > const \ + BOOST_PP_CAT(arg, BOOST_PP_INC(n)) = argument<n>(); \ + typedef actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ + actor<argument<n> > const \ + BOOST_PP_CAT(_, BOOST_PP_INC(n)) = argument<n>(); + +namespace boost { namespace phoenix +{ + namespace detail + { + template <typename Arg> + struct error_argument_not_found {}; + inline void test_invalid_argument(int) {} + } + + template <int N> + struct argument + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::at<typename Env::tie_type, mpl::int_<N> >::type + type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename + mpl::if_< + mpl::less<mpl::int_<N>, mpl::size<typename Env::args_type> > + , int + , detail::error_argument_not_found<argument<N> > + >::type + check_out_of_bounds; + + detail::test_invalid_argument(check_out_of_bounds()); + return fusion::at_c<N>(env.args()); + } + }; + + namespace arg_names + { + // Phoenix style names + typedef actor<argument<0> > arg1_type; + actor<argument<0> > const arg1 = argument<0>(); + typedef actor<argument<1> > arg2_type; + actor<argument<1> > const arg2 = argument<1>(); + typedef actor<argument<2> > arg3_type; + actor<argument<2> > const arg3 = argument<2>(); + + // BLL style names + typedef actor<argument<0> > _1_type; + actor<argument<0> > const _1 = argument<0>(); + typedef actor<argument<1> > _2_type; + actor<argument<1> > const _2 = argument<1>(); + typedef actor<argument<2> > _3_type; + actor<argument<2> > const _3 = argument<2>(); + + // Bring in the rest or the Phoenix style arguments (arg4 .. argN+1) + // and BLL style arguments (_4 .. _N+1), using PP + BOOST_PP_REPEAT_FROM_TO( + 3, PHOENIX_ARG_LIMIT, PHOENIX_DECLARE_ARG, _) + } +}} + +#undef PHOENIX_DECLARE_ARG +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp new file mode 100644 index 0000000..36f0aac --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_AS_ACTOR_HPP +#define PHOENIX_CORE_AS_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> + +namespace boost { namespace phoenix +{ + template <typename T> + struct as_actor_base; // defined in value.hpp + + template <typename Base> + struct as_actor_base<actor<Base> > + { + typedef Base type; + + static Base const& + convert(actor<Base> const& x) + { + return x; + } + }; + + template <> + struct as_actor_base<fusion::void_> + { + typedef fusion::void_ type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <> + struct as_actor_base<void> + { + typedef void type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <typename T> + struct as_actor + { + typedef actor<typename as_actor_base<T>::type> type; + + static type + convert(T const& x) + { + return as_actor_base<T>::convert(x); + } + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp new file mode 100644 index 0000000..5ef8223 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_BASIC_ENVIRONMENT_HPP +#define PHOENIX_CORE_BASIC_ENVIRONMENT_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/mpl/remove.hpp> +#include <boost/mpl/transform.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/fusion/include/mpl.hpp> + +namespace boost { namespace phoenix +{ + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_ARG_LIMIT, typename T, fusion::void_)> + class basic_environment + { + typedef + mpl::BOOST_PP_CAT(vector, PHOENIX_ARG_LIMIT)< + BOOST_PP_ENUM_PARAMS(PHOENIX_ARG_LIMIT, T)> + args_with_void_type; + + public: + + // args_type: the list of types in an mpl::sequence + typedef typename + mpl::remove<args_with_void_type, fusion::void_>::type + args_type; + + // tie_type: a fusion::tuple of references + typedef typename + fusion::result_of::as_vector< + typename mpl::transform< + args_type, boost::add_reference<mpl::_1> + >::type + >::type + tie_type; + + basic_environment() + : args_() {} + + template <typename U0> + explicit basic_environment(U0& _0) + : args_(_0) {} + + template <typename U0, typename U1> + basic_environment(U0& _0, U1& _1) + : args_(_0, _1) {} + + // Bring in the rest of the constructors + #include <boost/spirit/home/phoenix/core/detail/basic_environment.hpp> + + tie_type const& + args() const + { + return args_; + } + + tie_type& + args() + { + return args_; + } + + private: + + tie_type args_; + }; +}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp new file mode 100644 index 0000000..d536113 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp @@ -0,0 +1,118 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_COMPOSE_HPP +#define PHOENIX_CORE_COMPOSE_HPP + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/value.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> + +#define PHOENIX_AS_ACTOR(z, n, data) \ + typename mpl::eval_if< \ + is_same<BOOST_PP_CAT(T, n), fusion::void_> \ + , mpl::identity<fusion::void_> \ + , as_actor_base<BOOST_PP_CAT(T, n)> \ + >::type + +namespace boost { namespace phoenix +{ + +/////////////////////////////////////////////////////////////////////////////// +// +// as_composite<EvalPolicy, T0,... TN> metafunction +// +// Create a composite given an EvalPolicy and types T0..TN. +// The types are converted to an actor through the as_actor +// metafunction (see as_actor.hpp). +// +/////////////////////////////////////////////////////////////////////////////// + template < + typename EvalPolicy + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> + struct as_composite + { + typedef composite< + EvalPolicy + , fusion::vector< + BOOST_PP_ENUM(PHOENIX_COMPOSITE_LIMIT, PHOENIX_AS_ACTOR, _)> + > + type; + }; + +/////////////////////////////////////////////////////////////////////////////// +// +// compose functions +// +// Usage: +// +// compose<EvalPolicy>(_0, _1,... _N) +// +// Returns a composite given an EvalPolicy and arguments _0.._N. +// The arguments are converted to an actor through the as_actor +// metafunction (see as_actor.hpp). +// +/////////////////////////////////////////////////////////////////////////////// + template <typename EvalPolicy> + inline actor<typename as_composite<EvalPolicy>::type> + compose() + { + return actor<typename as_composite<EvalPolicy>::type>(); + } + + template <typename EvalPolicy, typename T0> + inline actor<typename as_composite<EvalPolicy, T0>::type> + compose(T0 const& _0) + { + return actor<typename as_composite<EvalPolicy, T0>::type>( + as_actor<T0>::convert(_0) + ); + } + + template <typename EvalPolicy, typename T0, typename T1> + inline actor<typename as_composite<EvalPolicy, T0, T1>::type> + compose(T0 const& _0, T1 const& _1) + { + return actor<typename as_composite<EvalPolicy, T0, T1>::type>( + as_actor<T0>::convert(_0) + , as_actor<T1>::convert(_1) + ); + } + + // Bring in the the rest of the compose overloads + #include <boost/spirit/home/phoenix/core/detail/compose.hpp> + +/////////////////////////////////////////////////////////////////////////////// +// +// re_curry<EvalPolicy, T0,...TN> +// +// returns the result of re currying T0..TN using EvalPolicy. +// +/////////////////////////////////////////////////////////////////////////////// + template < + typename EvalPolicy + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> + struct re_curry + { + typedef actor< + typename as_composite< + EvalPolicy + , BOOST_PP_ENUM_PARAMS(PHOENIX_COMPOSITE_LIMIT, T)>::type + > + type; + }; +}} + +#undef PHOENIX_AS_ACTOR +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp new file mode 100644 index 0000000..283bdc2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp @@ -0,0 +1,96 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_COMPOSITE_HPP +#define PHOENIX_CORE_COMPOSITE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/is_actor.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/fusion/include/mpl.hpp> +#include <boost/mpl/fold.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/or.hpp> + +namespace boost { namespace phoenix +{ + namespace detail + { + template <int N> + struct composite_eval; + + struct compute_no_nullary + { + template <typename State, typename T> + struct apply + { + typedef typename + mpl::or_<typename T::no_nullary, State>::type + type; + }; + }; + } + + template <typename EvalPolicy, typename EvalTuple> + struct composite : EvalTuple + { + typedef EvalTuple base_type; + typedef composite<EvalPolicy, EvalTuple> self_type; + typedef EvalPolicy eval_policy_type; + + typedef typename + mpl::fold< + EvalTuple + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef + typename detail::composite_eval< + fusion::result_of::size<base_type>::value>:: + template result<self_type, Env>::type + type; + }; + + composite() + : base_type() {} + + composite(base_type const& base) + : base_type(base) {} + + template <typename U0> + composite(U0& _0) + : base_type(_0) {} + + template <typename U0, typename U1> + composite(U0& _0, U1& _1) + : base_type(_0, _1) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type return_type; + return detail:: + composite_eval<fusion::result_of::size<base_type>::value>::template + call<return_type>(*this, env); + } + + // Bring in the rest of the constructors + #include <boost/spirit/home/phoenix/core/detail/composite.hpp> + }; + + // Bring in the detail::composite_eval<0..N> definitions + #include <boost/spirit/home/phoenix/core/detail/composite_eval.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp new file mode 100644 index 0000000..66666c5 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_ACTOR_HPP +#define PHOENIX_CORE_DETAIL_ACTOR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/facilities/intercept.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_ACTOR_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/actor.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + : Eval(BOOST_PP_ENUM_PARAMS(N, _)) {} + + template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)> + struct result<F(BOOST_PP_ENUM_PARAMS(N, A))> + : eval_result< + eval_type + , basic_environment< + BOOST_PP_ENUM_BINARY_PARAMS( + N + , typename remove_reference<A + , >::type BOOST_PP_INTERCEPT + ) + > + > + {}; + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + typename result< + actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & BOOST_PP_INTERCEPT)) + >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) const + { + return eval_type::eval( + basic_environment<BOOST_PP_ENUM_PARAMS(N, T)>( + BOOST_PP_ENUM_PARAMS(N, _)) + ); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp new file mode 100644 index 0000000..986ecf2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP +#define PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_ARG_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/basic_environment.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename U)> + basic_environment(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) + : args_(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp new file mode 100644 index 0000000..945a3d3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP +#define PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> + +#define PHOENIX_AS_ACTOR_CONVERT(z, n, data) \ + as_actor<BOOST_PP_CAT(T, n)>::convert(BOOST_PP_CAT(_, n)) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/compose.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_AS_ACTOR_CONVERT +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename EvalPolicy, BOOST_PP_ENUM_PARAMS(N, typename T)> + inline actor< + typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type> + compose(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return actor< + typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type>( + BOOST_PP_ENUM(N, PHOENIX_AS_ACTOR_CONVERT, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp new file mode 100644 index 0000000..6970f7c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_HPP +#define PHOENIX_CORE_DETAIL_COMPOSITE_HPP + +#include <boost/preprocessor/iterate.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/composite.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename U)> + composite(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) + : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp new file mode 100644 index 0000000..14f12af --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp @@ -0,0 +1,106 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP +#define PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> + + namespace detail + { + template <int N> + struct composite_eval; + + template <> + struct composite_eval<0> + { + template <typename Composite, typename Env> + struct result + { + typedef typename Composite::eval_policy_type:: + template result<Env>::type + type; + }; + + template <typename RT, typename Composite, typename Env> + static RT + call(Composite const& /*composite*/, Env const& env) + { + typedef typename Composite::eval_policy_type eval_policy_type; + return eval_policy_type::template eval<RT>(env); + } + }; + + template <typename Actor, typename Env> + struct eval_is_actor + : is_actor<typename Actor::template result<Env>::type> {}; + + template <typename Actor, typename Env> + struct eval_is_void + : is_same<typename Actor::template result<Env>::type, fusion::void_> {}; + } + +#define PHOENIX_GET_ACTOR_TYPE(z, n, data) \ + typedef \ + typename fusion::result_of::value_at_c<Composite, n>::type \ + BOOST_PP_CAT(actor, n); + +#define PHOENIX_GET_ACTOR(z, n, data) \ + fusion::at_c<n>(composite) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/composite_eval.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_GET_ACTOR +#undef PHOENIX_GET_ACTOR_TYPE +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + namespace detail + { + template <> + struct composite_eval<N> + { + template <typename Composite, typename Env> + struct result + { + BOOST_PP_REPEAT(N, PHOENIX_GET_ACTOR_TYPE, _) + + typedef typename + Composite::eval_policy_type::template result< + Env, BOOST_PP_ENUM_PARAMS(N, actor) + >::type + type; + }; + + template <typename RT, typename Composite, typename Env> + static RT + call(Composite const& composite, Env const& env) + { + typedef typename Composite::eval_policy_type eval_policy_type; + return eval_policy_type::template eval<RT>( + env, BOOST_PP_ENUM(N, PHOENIX_GET_ACTOR, _)); + } + }; + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp new file mode 100644 index 0000000..711b32c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp @@ -0,0 +1,142 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP) +#define PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/enum.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_reference.hpp> + +// we assume that mpl::vectorN, where N = PHOENIX_COMPOSITE_LIMIT +// is included already. + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct function_eval; + + template <> + struct function_eval<0> + { + template <typename Env, typename F> + struct result + { + typedef typename + remove_reference< + typename F::template result<Env>::type + >::type + fn; + typedef typename fn::result_type type; + }; + + template <typename RT, typename Env, typename F> + static RT + eval(Env const& env, F const& f) + { + return f.eval(env)(); + } + }; + + template <typename T> + T& help_rvalue_deduction(T& x) + { + return x; + } + + template <typename T> + T const& help_rvalue_deduction(T const& x) + { + return x; + } + +// When we call f(_0, _1...) we remove the reference when deducing f's +// return type. $$$ Explain why $$$ + +#define PHOENIX_GET_ARG(z, n, data) \ + typedef typename \ + remove_reference< \ + typename BOOST_PP_CAT(A, n)::template result<Env>::type \ + >::type \ + BOOST_PP_CAT(a, n); + +#define PHOENIX_EVAL_ARG(z, n, data) \ + help_rvalue_deduction(BOOST_PP_CAT(_, n).eval(env)) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/core/detail/function_eval.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#undef PHOENIX_GET_ARG +#undef PHOENIX_EVAL_ARG +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct function_eval<N> + { + template <typename Env, typename F + , BOOST_PP_ENUM_PARAMS(N, typename A)> + struct result + { + typedef typename + remove_reference< + typename F::template result<Env>::type + >::type + fn; + BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _) + + typedef BOOST_PP_CAT(mpl::vector, N) + <BOOST_PP_ENUM_PARAMS(N, a)> + args; + + typedef typename + fn::template result<BOOST_PP_ENUM_PARAMS(N, a)> + function_apply; + + typedef typename + mpl::eval_if< + is_same< + typename mpl::find<args, fusion::void_>::type + , typename mpl::end<args>::type> + , function_apply + , mpl::identity<fusion::void_> + >::type + type; + }; + + template <typename RT, typename Env, typename F + , BOOST_PP_ENUM_PARAMS(N, typename A)> + static RT + eval(Env const& env, F const& f + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) + { + return f.eval(env)(BOOST_PP_ENUM(N, PHOENIX_EVAL_ARG, _)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp new file mode 100644 index 0000000..ba0e77c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_IS_ACTOR_HPP +#define PHOENIX_CORE_IS_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// is_actor<T> +// +// Tests if T is an actor. Evaluates to mpl::true_ or mpl::false_ +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T> + struct is_actor : mpl::false_ {}; + + template <typename Base> + struct is_actor<actor<Base> > : mpl::true_ {}; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp new file mode 100644 index 0000000..50c7573 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_LIMITS_HPP +#define PHOENIX_CORE_LIMITS_HPP + +#include <boost/preprocessor/dec.hpp> + +#if !defined(PHOENIX_LIMIT) +# define PHOENIX_LIMIT 10 +#elif (PHOENIX_LIMIT < 5) +# error "PHOENIX_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_ARG_LIMIT) +# define PHOENIX_ARG_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_ARG_LIMIT < 5) +# error "PHOENIX_ARG_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_ACTOR_LIMIT) +# define PHOENIX_ACTOR_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT) +# error "PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT" +#elif (PHOENIX_ACTOR_LIMIT < 3) +# error "PHOENIX_ACTOR_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_COMPOSITE_LIMIT) +# define PHOENIX_COMPOSITE_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_COMPOSITE_LIMIT < 5) +# error "PHOENIX_COMPOSITE_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_MEMBER_LIMIT) +# define PHOENIX_MEMBER_LIMIT BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)) +#elif (PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT) +# error "PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT" +#elif (PHOENIX_MEMBER_LIMIT < 3) +# error "PHOENIX_MEMBER_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_CATCH_LIMIT) +# define PHOENIX_CATCH_LIMIT BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT) +#elif (PHOENIX_CATCH_LIMIT < 1) +# error "PHOENIX_CATCH_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_DYNAMIC_LIMIT) +# define PHOENIX_DYNAMIC_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_DYNAMIC_LIMIT < 1) +# error "PHOENIX_DYNAMIC_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_LOCAL_LIMIT) +# define PHOENIX_LOCAL_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_LOCAL_LIMIT < 3) +# error "PHOENIX_LOCAL_LIMIT is set too low" +#endif + + +#if !defined(FUSION_MAX_VECTOR_SIZE) +# define FUSION_MAX_VECTOR_SIZE PHOENIX_LIMIT +#elif (FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT) +# error "FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT" +#endif + +// this include will bring in mpl::vectorN and +// fusion::vectorN where N is PHOENIX_LIMIT +#include <boost/fusion/include/vector.hpp> + +// for some reason, this must be included now to make +// detail/type_deduction.hpp compile. $$$ TODO: Investigate further $$$ +#include <boost/mpl/vector/vector20.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp new file mode 100644 index 0000000..029fbbf --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_NOTHING_HPP +#define PHOENIX_CORE_NOTHING_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// null_actor +// +// A actor that does nothing (a "bum", if you will :-). +// +/////////////////////////////////////////////////////////////////////////////// + struct null_actor + { + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef void type; + }; + + template <typename Env> + void + eval(Env const&) const + { + } + }; + + actor<null_actor> const nothing = null_actor(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp new file mode 100644 index 0000000..2e1f588 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_REFERENCE_HPP +#define PHOENIX_CORE_REFERENCE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename T> + struct reference + { + // $$$ TODO: a better (user friendly) static assert + BOOST_STATIC_ASSERT( + mpl::not_<is_reference<T> >::value != 0); + + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef T& type; + }; + + reference(T& arg) + : ref(arg) {} + + template <typename Env> + T& eval(Env const&) const + { + return ref; + } + + T& ref; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reference& operator= (reference const&); + }; + + template <typename T> + inline actor<reference<T> > const + ref(T& v) + { + return reference<T>(v); + } + + template <typename T> + inline actor<reference<T const> > const + cref(T const& v) + { + return reference<T const>(v); + } + + namespace detail + { + struct error_attempting_to_convert_an_actor_to_a_reference {}; + } + + template <typename Base> + void + ref(actor<Base> const& v + , detail::error_attempting_to_convert_an_actor_to_a_reference + = detail::error_attempting_to_convert_an_actor_to_a_reference()); + + template <typename Base> + void + cref(actor<Base> const& v + , detail::error_attempting_to_convert_an_actor_to_a_reference + = detail::error_attempting_to_convert_an_actor_to_a_reference()); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp new file mode 100644 index 0000000..a275a7d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp @@ -0,0 +1,158 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_VALUE_HPP +#define PHOENIX_CORE_VALUE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/static_assert.hpp> + +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/is_function.hpp> + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> + +namespace boost { namespace phoenix +{ + namespace meta + { + template<typename T> + struct const_ref + : add_reference<typename add_const<T>::type> + {}; + + template<typename T> + struct argument_type + : mpl::eval_if< + is_function<typename remove_pointer<T>::type>, + mpl::identity<T>, + const_ref<T> > + { + typedef T type; + }; + } + + template <typename T> + struct value + { + BOOST_STATIC_ASSERT( + mpl::not_<is_reference<T> >::value != 0); + + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef T type; + }; + + value() + : val() {} + + value(T const& arg) + : val(arg) {} + + template <typename Env> + T const& + eval(Env const&) const + { + return val; + } + + T val; + }; + + template <typename Actor> + struct actor_value + { + typedef typename Actor::no_nullary no_nullary; + + template <typename Env> + struct result + { + typedef typename + remove_reference< + typename eval_result<Actor, Env>::type + >::type + type; + }; + + actor_value(Actor const& actor) + : actor(actor) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return actor.eval(env); + } + + Actor actor; + }; + + template <typename T> + inline typename as_actor<T>::type + val(T const& v) + { + return as_actor<T>::convert(v); + } + + template <typename Derived> + inline actor<actor_value<Derived> > + val(actor<Derived> const& actor) + { + return actor_value<Derived>(actor); + } + + template <typename T> + struct as_actor_base + { + typedef value<T> type; + + static value<T> + convert(typename meta::argument_type<T>::type x) + { + return value<T>(x); + } + }; + + // Sometimes it is necessary to auto-convert references to + // a value<T>. This happens when we are re-currying. This + // cannot happen through the standard public actor interfaces. + template <typename T> + struct as_actor_base<T&> + { + typedef value<T> type; + + static value<T> + convert(T& x) + { + return value<T>(x); + } + }; + + template <typename T, int N> + struct as_actor_base<T[N]> + { + typedef value<T const*> type; + + static value<T const*> + convert(T const x[N]) + { + return value<T const*>(x); + } + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp new file mode 100644 index 0000000..ad1fdb4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_DETAIL_LOCAL_REFERENCE_HPP +#define PHOENIX_DETAIL_LOCAL_REFERENCE_HPP + +#include <boost/utility/addressof.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <typename T> + struct local_reference + { + typedef T type; + + explicit local_reference(T& t): t_(boost::addressof(t)) {} + operator T& () const { return *t_; } + local_reference& operator=(T const& x) { *t_ = x; return *this; } + local_reference const& operator=(T const& x) const { *t_ = x; return *this; } + T& get() const { return *t_; } + T* get_pointer() const { return t_; } + + private: + + T* t_; + }; + + template <typename T> + struct unwrap_local_reference + { + typedef T type; // T should be a reference + }; + + template <typename T> + struct unwrap_local_reference<local_reference<T> > + { + typedef T type; // unwrap the reference; T is a value + }; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp new file mode 100644 index 0000000..b99ea1e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp @@ -0,0 +1,497 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_DETAIL_TYPE_DEDUCTION_HPP +#define PHOENIX_DETAIL_TYPE_DEDUCTION_HPP + +/*============================================================================= + + Return Type Deduction + [JDG Sept. 15, 2003] + + Before C++ adopts the typeof, there is currently no way to deduce the + result type of an expression such as x + y. This deficiency is a major + problem with template metaprogramming; for example, when writing + forwarding functions that attempt to capture the essence of an + expression inside a function. Consider the std::plus<T>: + + template <typename T> + struct plus : public binary_function<T, T, T> + { + T operator()(T const& x, T const& y) const + { + return x + y; + } + }; + + What's wrong with this? Well, this functor does not accurately capture + the behavior of the plus operator. 1) It does not handle the case where + x and y are of different types (e.g. x is short and y is int). 2) It + assumes that the arguments and return type are the same (i.e. when + adding a short and an int, the return type ought to be an int). Due to + these shortcomings, std::plus<T>(x, y) is a poor substitute for x + y. + + The case where x is short and y is int does not really expose the + problem. We can simply use std::plus<int> and be happy that the + operands x and y will simply be converted to an int. The problem + becomes evident when an operand is a user defined type such as bigint. + Here, the conversion to bigint is simply not acceptable. Even if the + unnecessary conversion is tolerable, in generic code, it is not always + possible to choose the right T type that can accomodate both x and y + operands. + + To truly model the plus operator, what we need is a polymorphic functor + that can take arbitrary x and y operands. Here's a rough schematic: + + struct plus + { + template <typename X, typename Y> + unspecified-type + operator()(X const& x, Y const& y) const + { + return x + y; + } + }; + + Now, we can handle the case where X and Y are arbitrary types. We've + solved the first problem. To solve the second problem, we need some + form of return type deduction mechanism. If we had the typeof, it would + be something like: + + template <typename X, typename Y> + typeof(X() + Y()) + operator()(X const& x, Y const& y) const + { + return x + y; + } + + Without the typeof facility, it is only possible to wrap an expression + such as x + y in a function or functor if we are given a hint that + tells us what the actual result type of such an expression is. Such a + hint can be in the form of a metaprogram, that, given the types of the + arguments, will return the result type. Example: + + template <typename X, typename Y> + struct result_of_plus + { + typedef unspecified-type type; + }; + + Given a result_of_plus metaprogram, we can complete our polymorphic + plus functor: + + struct plus + { + template <typename X, typename Y> + typename result_of_plus<X, Y>::type + operator()(X const& x, Y const& y) const + { + return x + y; + } + }; + + The process is not automatic. We have to specialize the metaprogram for + specific argument types. Examples: + + template <> + struct result_of_plus<short, int> + { + typedef int type; + }; + + template <typename T> + struct result_of_plus<std::complex<T>, std::complex<T> > + { + typedef std::complex<T> type; + }; + + To make it easier for the user, specializations are provided for common + types such as primitive c++ types (e.g. int, char, double, etc.), and + standard types (e.g. std::complex, iostream, std containers and + iterators). + + To further improve the ease of use, for user defined classes, we can + supply a few more basic specializations through metaprogramming using + heuristics based on canonical operator rules (Such heuristics can be + found in the LL and Phoenix, for example). For example, it is rather + common that the result of x += y is X& or the result of x || y is a + bool. The client is out of luck if her classes do not follow the + canonical rules. She'll then have to supply her own specialization. + + The type deduction mechanism demostrated below approaches the problem + not through specialization and heuristics, but through a limited form + of typeof mechanism. The code does not use heuristics, hence, no + guessing games. The code takes advantage of the fact that, in general, + the result type of an expression is related to one its arguments' type. + For example, x + y, where x has type int and y has type double, has the + result type double (the second operand type). Another example, x[y] + where x is a vector<T> and y is a std::size_t, has the result type + vector<T>::reference (the vector<T>'s reference type type). + + The limited form of type deduction presented can detect common + relations if the result of a binary or unary operation, given arguments + x and y with types X and Y (respectively), is X, Y, X&, Y&, X*, Y*, X + const*, Y const*, bool, int, unsigned, double, container and iterator + elements (e.g the T, where X is: T[N], T*, vector<T>, map<T>, + vector<T>::iterator). More arguments/return type relationships can be + established if needed. + + A set of overloaded test(T) functions capture these argument related + types. Each test(T) function returns a distinct type that can be used + to determine the exact type of an expression. + + Consider: + + template <typename X, typename Y> + x_value_type + test(X const&); + + template <typename X, typename Y> + y_value_type + test(Y const&); + + Given an expression x + y, where x is int and y is double, the call to: + + test<int, double>(x + y) + + will return a y_value_type. + + Now, if we rig x_value_type and y_value_type such that both have unique + sizes, we can use sizeof(test<X, Y>(x + y)) to determine if the result + type is either X or Y. + + For example, if: + + sizeof(test<X, Y>(x + y)) == sizeof(y_value_type) + + then, we know for sure that the result of x + y has type Y. + + The same basic scheme can be used to detect more argument-dependent + return types where the sizeof the test(T) return type is used to index + through a boost::mpl vector which holds each of the corresponding + result types. + +==============================================================================*/ +#include <boost/mpl/vector/vector20.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/remove_cv.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_array.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/static_assert.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> + +namespace boost +{ + struct error_cant_deduce_type {}; +} + +namespace boost { namespace type_deduction_detail +{ + typedef char(&bool_value_type)[1]; + typedef char(&int_value_type)[2]; + typedef char(&uint_value_type)[3]; + typedef char(&double_value_type)[4]; + + typedef char(&bool_reference_type)[5]; + typedef char(&int_reference_type)[6]; + typedef char(&uint_reference_type)[7]; + typedef char(&double_reference_type)[8]; + + typedef char(&x_value_type)[9]; + typedef char(&x_reference_type)[10]; + typedef char(&x_const_pointer_type)[11]; + typedef char(&x_pointer_type)[12]; + + typedef char(&y_value_type)[13]; + typedef char(&y_reference_type)[14]; + typedef char(&y_const_pointer_type)[15]; + typedef char(&y_pointer_type)[16]; + + typedef char(&container_reference_type)[17]; + typedef char(&container_const_reference_type)[18]; + typedef char(&container_mapped_type)[19]; + + typedef char(&cant_deduce_type)[20]; + + template <typename T, typename Plain = typename remove_cv<T>::type> + struct is_basic + : mpl::or_< + is_same<Plain, bool> + , is_same<Plain, int> + , is_same<Plain, unsigned> + , is_same<Plain, double> + > {}; + + template <typename C> + struct reference_type + { + typedef typename C::reference type; + }; + + template <typename T> + struct reference_type<T const> + : reference_type<T> {}; + + template <typename T, std::size_t N> + struct reference_type<T[N]> + { + typedef T& type; + }; + + template <typename T> + struct reference_type<T*> + { + typedef T& type; + }; + + template <typename T> + struct reference_type<T* const> + { + typedef T const& type; + }; + + template <typename C> + struct const_reference_type + { + typedef typename C::const_reference type; + }; + + template <typename C> + struct mapped_type + { + typedef typename C::mapped_type type; + }; + + struct asymmetric; + + template <typename X, typename Y> + cant_deduce_type + test(...); // The black hole !!! + + template <typename X, typename Y> + bool_value_type + test(bool const&); + + template <typename X, typename Y> + int_value_type + test(int const&); + + template <typename X, typename Y> + uint_value_type + test(unsigned const&); + + template <typename X, typename Y> + double_value_type + test(double const&); + + template <typename X, typename Y> + bool_reference_type + test(bool&); + + template <typename X, typename Y> + int_reference_type + test(int&); + + template <typename X, typename Y> + uint_reference_type + test(unsigned&); + + template <typename X, typename Y> + double_reference_type + test(double&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_<is_basic<X>, is_const<X> > + , x_value_type + >::type + test(X const&); + + template <typename X, typename Y> + typename disable_if< + is_basic<X> + , x_reference_type + >::type + test(X&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<X> + , is_const<X> + > + , x_const_pointer_type + >::type + test(X const*); + + template <typename X, typename Y> + x_pointer_type + test(X*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<Y> + , is_same<Y, asymmetric> + , is_const<Y> + , is_same<X, Y> + > + , y_value_type + >::type + test(Y const&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<Y> + , is_same<Y, asymmetric> + , is_same<X, Y> + > + , y_reference_type + >::type + test(Y&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_same<Y, asymmetric> + , is_const<Y> + , is_same<X, Y> + > + , y_const_pointer_type + >::type + test(Y const*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_same<Y, asymmetric> + , is_same<X, Y> + > + , y_pointer_type + >::type + test(Y*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<typename X::value_type> + , is_same<typename add_reference<X>::type, typename X::reference> + > + , container_reference_type + >::type + test(typename X::reference); + + template <typename X, typename Y, typename Z> + typename enable_if< + mpl::and_< + mpl::or_<is_array<X>, is_pointer<X> > + , mpl::not_<is_basic<Z> > + , mpl::not_<is_same<X, Z> > + > + , container_reference_type + >::type + test(Z&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<typename X::value_type> + , is_same<typename add_reference<X>::type, typename X::const_reference> + > + , container_const_reference_type + >::type + test(typename X::const_reference); + + template <typename X, typename Y> + typename disable_if< + is_basic<typename X::mapped_type> + , container_mapped_type + >::type + test(typename X::mapped_type); + + template <typename X, typename Y> + struct base_result_of + { + typedef typename phoenix::detail::unwrap_local_reference<X>::type x_type_; + typedef typename phoenix::detail::unwrap_local_reference<Y>::type y_type_; + typedef typename remove_reference<x_type_>::type x_type; + typedef typename remove_reference<y_type_>::type y_type; + + typedef mpl::vector20< + mpl::identity<bool> + , mpl::identity<int> + , mpl::identity<unsigned> + , mpl::identity<double> + , mpl::identity<bool&> + , mpl::identity<int&> + , mpl::identity<unsigned&> + , mpl::identity<double&> + , mpl::identity<x_type> + , mpl::identity<x_type&> + , mpl::identity<x_type const*> + , mpl::identity<x_type*> + , mpl::identity<y_type> + , mpl::identity<y_type&> + , mpl::identity<y_type const*> + , mpl::identity<y_type*> + , reference_type<x_type> + , const_reference_type<x_type> + , mapped_type<x_type> + , mpl::identity<error_cant_deduce_type> + > + types; + }; + +}} // namespace boost::type_deduction_detail + +#define BOOST_RESULT_OF_COMMON(expr, name, Y, SYMMETRY) \ + struct name \ + { \ + typedef type_deduction_detail::base_result_of<X, Y> base_type; \ + static typename base_type::x_type x; \ + static typename base_type::y_type y; \ + \ + BOOST_STATIC_CONSTANT(int, \ + size = sizeof( \ + type_deduction_detail::test< \ + typename base_type::x_type \ + , SYMMETRY \ + >(expr) \ + )); \ + \ + BOOST_STATIC_CONSTANT(int, index = (size / sizeof(char)) - 1); \ + \ + typedef typename mpl::at_c< \ + typename base_type::types, index>::type id; \ + typedef typename id::type type; \ + }; + +#define BOOST_UNARY_RESULT_OF(expr, name) \ + template <typename X> \ + BOOST_RESULT_OF_COMMON(expr, name, \ + type_deduction_detail::asymmetric, type_deduction_detail::asymmetric) + +#define BOOST_BINARY_RESULT_OF(expr, name) \ + template <typename X, typename Y> \ + BOOST_RESULT_OF_COMMON(expr, name, Y, typename base_type::y_type) + +#define BOOST_ASYMMETRIC_BINARY_RESULT_OF(expr, name) \ + template <typename X, typename Y> \ + BOOST_RESULT_OF_COMMON(expr, name, Y, type_deduction_detail::asymmetric) + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp new file mode 100644 index 0000000..5309d9a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_FUNCTION_HPP +#define PHOENIX_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/function/function.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp new file mode 100644 index 0000000..622f118 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP +#define PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/function/detail/function_call.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename A)> + actor<typename as_composite<detail::function_eval<N>, F + , BOOST_PP_ENUM_PARAMS(N, A)>::type> + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) const + { + return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp new file mode 100644 index 0000000..1cf4701 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_FUNCTION_FUNCTION_HPP +#define PHOENIX_FUNCTION_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> + +namespace boost { namespace phoenix +{ + template <typename F> + struct function + { + function() : f() {} + function(F const& f) : f(f) {} + + actor<typename as_composite<detail::function_eval<0>, F>::type> + operator()() const + { + return compose<detail::function_eval<0> >(f); + } + + template <typename A0> + actor<typename as_composite<detail::function_eval<1>, F, A0>::type> + operator()(A0 const& _0) const + { + return compose<detail::function_eval<1> >(f, _0); + } + + template <typename A0, typename A1> + actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type> + operator()(A0 const& _0, A1 const& _1) const + { + return compose<detail::function_eval<2> >(f, _0, _1); + } + + // Bring in the rest of the function call operators + #include <boost/spirit/home/phoenix/function/detail/function_call.hpp> + + F f; + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp new file mode 100644 index 0000000..2d8ee6c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_HPP +#define PHOENIX_OPERATOR_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/operator/arithmetic.hpp> +#include <boost/spirit/home/phoenix/operator/bitwise.hpp> +#include <boost/spirit/home/phoenix/operator/comparison.hpp> +#include <boost/spirit/home/phoenix/operator/if_else.hpp> +#include <boost/spirit/home/phoenix/operator/logical.hpp> +#include <boost/spirit/home/phoenix/operator/self.hpp> +#include <boost/spirit/home/phoenix/operator/io.hpp> +#include <boost/spirit/home/phoenix/operator/member.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp new file mode 100644 index 0000000..e51b23e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_ARITHMETIC_HPP +#define PHOENIX_OPERATOR_ARITHMETIC_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct negate_eval; + struct posit_eval; + struct pre_increment_eval; + struct pre_decrement_eval; + struct post_increment_eval; + struct post_decrement_eval; + + struct plus_assign_eval; + struct minus_assign_eval; + struct multiplies_assign_eval; + struct divides_assign_eval; + struct modulus_assign_eval; + + struct plus_eval; + struct minus_eval; + struct multiplies_eval; + struct divides_eval; + struct modulus_eval; + + BOOST_UNARY_RESULT_OF(-x, result_of_negate) + BOOST_UNARY_RESULT_OF(+x, result_of_posit) + BOOST_UNARY_RESULT_OF(++x, result_of_pre_increment) + BOOST_UNARY_RESULT_OF(--x, result_of_pre_decrement) + BOOST_UNARY_RESULT_OF(x++, result_of_post_increment) + BOOST_UNARY_RESULT_OF(x--, result_of_post_decrement) + + BOOST_BINARY_RESULT_OF(x += y, result_of_plus_assign) + BOOST_BINARY_RESULT_OF(x -= y, result_of_minus_assign) + BOOST_BINARY_RESULT_OF(x *= y, result_of_multiplies_assign) + BOOST_BINARY_RESULT_OF(x /= y, result_of_divides_assign) + BOOST_BINARY_RESULT_OF(x %= y, result_of_modulus_assign) + + BOOST_BINARY_RESULT_OF(x + y, result_of_plus) + BOOST_BINARY_RESULT_OF(x - y, result_of_minus) + BOOST_BINARY_RESULT_OF(x * y, result_of_multiplies) + BOOST_BINARY_RESULT_OF(x / y, result_of_divides) + BOOST_BINARY_RESULT_OF(x % y, result_of_modulus) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(negate_eval, result_of_negate, -x) + PHOENIX_UNARY_EVAL(posit_eval, result_of_posit, +x) + PHOENIX_UNARY_EVAL(pre_increment_eval, result_of_pre_increment, ++x) + PHOENIX_UNARY_EVAL(pre_decrement_eval, result_of_pre_decrement, --x) + PHOENIX_UNARY_EVAL(post_increment_eval, result_of_post_increment, x++) + PHOENIX_UNARY_EVAL(post_decrement_eval, result_of_post_decrement, x--) + + PHOENIX_BINARY_EVAL(plus_assign_eval, result_of_plus_assign, x += y) + PHOENIX_BINARY_EVAL(minus_assign_eval, result_of_minus_assign, x -= y) + PHOENIX_BINARY_EVAL(multiplies_assign_eval, result_of_multiplies_assign, x *= y) + PHOENIX_BINARY_EVAL(divides_assign_eval, result_of_divides_assign, x /= y) + PHOENIX_BINARY_EVAL(modulus_assign_eval, result_of_modulus_assign, x %= y) + + PHOENIX_BINARY_EVAL(plus_eval, result_of_plus, x + y) + PHOENIX_BINARY_EVAL(minus_eval, result_of_minus, x - y) + PHOENIX_BINARY_EVAL(multiplies_eval, result_of_multiplies, x * y) + PHOENIX_BINARY_EVAL(divides_eval, result_of_divides, x / y) + PHOENIX_BINARY_EVAL(modulus_eval, result_of_modulus, x % y) + + PHOENIX_UNARY_COMPOSE(negate_eval, -) + PHOENIX_UNARY_COMPOSE(posit_eval, +) + PHOENIX_UNARY_COMPOSE(pre_increment_eval, ++) + PHOENIX_UNARY_COMPOSE(pre_decrement_eval, --) + + template <typename T0> + inline actor<typename as_composite<post_increment_eval, actor<T0> >::type> + operator++(actor<T0> const& a0, int) // special case + { + return compose<post_increment_eval>(a0); + } + + template <typename T0> + inline actor<typename as_composite<post_decrement_eval, actor<T0> >::type> + operator--(actor<T0> const& a0, int) // special case + { + return compose<post_decrement_eval>(a0); + } + + PHOENIX_BINARY_COMPOSE(plus_assign_eval, +=) + PHOENIX_BINARY_COMPOSE(minus_assign_eval, -=) + PHOENIX_BINARY_COMPOSE(multiplies_assign_eval, *=) + PHOENIX_BINARY_COMPOSE(divides_assign_eval, /=) + PHOENIX_BINARY_COMPOSE(modulus_assign_eval, %=) + + PHOENIX_BINARY_COMPOSE(plus_eval, +) + PHOENIX_BINARY_COMPOSE(minus_eval, -) + PHOENIX_BINARY_COMPOSE(multiplies_eval, *) + PHOENIX_BINARY_COMPOSE(divides_eval, /) + PHOENIX_BINARY_COMPOSE(modulus_eval, %) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp new file mode 100644 index 0000000..0450db4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_BITWISE_HPP +#define PHOENIX_OPERATOR_BITWISE_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4800) +#endif + +namespace boost { namespace phoenix +{ + struct invert_eval; + + struct and_assign_eval; + struct or_assign_eval; + struct xor_assign_eval; + struct shift_left_assign_eval; + struct shift_right_assign_eval; + + struct and_eval; + struct or_eval; + struct xor_eval; + struct shift_left_eval; + struct shift_right_eval; + + BOOST_UNARY_RESULT_OF(~x, result_of_invert) + + BOOST_BINARY_RESULT_OF(x &= y, result_of_and_assign) + BOOST_BINARY_RESULT_OF(x |= y, result_of_or_assign) + BOOST_BINARY_RESULT_OF(x ^= y, result_of_xor_assign) + BOOST_BINARY_RESULT_OF(x <<= y, result_of_shift_left_assign) + BOOST_BINARY_RESULT_OF(x >>= y, result_of_shift_right_assign) + + BOOST_BINARY_RESULT_OF(x & y, result_of_and) + BOOST_BINARY_RESULT_OF(x | y, result_of_or) + BOOST_BINARY_RESULT_OF(x ^ y, result_of_xor) + BOOST_BINARY_RESULT_OF(x << y, result_of_shift_left) + BOOST_BINARY_RESULT_OF(x >> y, result_of_shift_right) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(invert_eval, result_of_invert, ~x) + PHOENIX_UNARY_COMPOSE(invert_eval, ~) + + PHOENIX_BINARY_EVAL(and_assign_eval, result_of_and_assign, x &= y) + PHOENIX_BINARY_EVAL(or_assign_eval, result_of_or_assign, x |= y) + PHOENIX_BINARY_EVAL(xor_assign_eval, result_of_xor_assign, x ^= y) + PHOENIX_BINARY_EVAL(shift_left_assign_eval, result_of_shift_left_assign, x <<= y) + PHOENIX_BINARY_EVAL(shift_right_assign_eval, result_of_shift_right_assign, x >>= y) + + PHOENIX_BINARY_EVAL(and_eval, result_of_and, x & y) + PHOENIX_BINARY_EVAL(or_eval, result_of_or, x | y) + PHOENIX_BINARY_EVAL(xor_eval, result_of_xor, x ^ y) + PHOENIX_BINARY_EVAL(shift_left_eval, result_of_shift_left, x << y) + PHOENIX_BINARY_EVAL(shift_right_eval, result_of_shift_right, x >> y) + + PHOENIX_BINARY_COMPOSE(and_assign_eval, &=) + PHOENIX_BINARY_COMPOSE(or_assign_eval, |=) + PHOENIX_BINARY_COMPOSE(xor_assign_eval, ^=) + PHOENIX_BINARY_COMPOSE(shift_left_assign_eval, <<=) + PHOENIX_BINARY_COMPOSE(shift_right_assign_eval, >>=) + + PHOENIX_BINARY_COMPOSE(and_eval, &) + PHOENIX_BINARY_COMPOSE(or_eval, |) + PHOENIX_BINARY_COMPOSE(xor_eval, ^) + PHOENIX_BINARY_COMPOSE(shift_left_eval, <<) + PHOENIX_BINARY_COMPOSE(shift_right_eval, >>) + +#undef x +#undef y +}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp new file mode 100644 index 0000000..fe9298c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_COMPARISON_HPP +#define PHOENIX_OPERATOR_COMPARISON_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct equal_to_eval; + struct not_equal_to_eval; + struct less_eval; + struct less_equal_eval; + struct greater_eval; + struct greater_equal_eval; + + BOOST_BINARY_RESULT_OF(x == y, result_of_equal_to) + BOOST_BINARY_RESULT_OF(x != y, result_of_not_equal_to) + BOOST_BINARY_RESULT_OF(x < y, result_of_less) + BOOST_BINARY_RESULT_OF(x <= y, result_of_less_equal) + BOOST_BINARY_RESULT_OF(x > y, result_of_greater) + BOOST_BINARY_RESULT_OF(x >= y, result_of_greater_equal) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_BINARY_EVAL(equal_to_eval, result_of_equal_to, x == y) + PHOENIX_BINARY_EVAL(not_equal_to_eval, result_of_not_equal_to, x != y) + PHOENIX_BINARY_EVAL(less_eval, result_of_less, x < y) + PHOENIX_BINARY_EVAL(less_equal_eval, result_of_less_equal, x <= y) + PHOENIX_BINARY_EVAL(greater_eval, result_of_greater, x > y) + PHOENIX_BINARY_EVAL(greater_equal_eval, result_of_greater_equal, x >= y) + + PHOENIX_BINARY_COMPOSE(equal_to_eval, ==) + PHOENIX_BINARY_COMPOSE(not_equal_to_eval, !=) + PHOENIX_BINARY_COMPOSE(less_eval, <) + PHOENIX_BINARY_COMPOSE(less_equal_eval, <=) + PHOENIX_BINARY_COMPOSE(greater_eval, >) + PHOENIX_BINARY_COMPOSE(greater_equal_eval, >=) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp new file mode 100644 index 0000000..49335fd --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP +#define PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP + +#define PHOENIX_BINARY_COMPOSE(eval_name, op) \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, actor<T0>, actor<T1> >::type> \ + operator op (actor<T0> const& a0, actor<T1> const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } \ + \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, actor<T0>, T1>::type> \ + operator op (actor<T0> const& a0, T1 const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } \ + \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, T0, actor<T1> >::type> \ + operator op (T0 const& a0, actor<T1> const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp new file mode 100644 index 0000000..1789882 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_DETAIL_BINARY_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_BINARY_EVAL_HPP + +#include <boost/mpl/or.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#define PHOENIX_BINARY_EVAL(eval_name, op_result, expr) \ + struct eval_name \ + { \ + template <typename Env, typename A0, typename A1> \ + struct result \ + { \ + typedef typename A0::template result<Env>::type x_type; \ + typedef typename A1::template result<Env>::type y_type; \ + \ + typedef typename \ + mpl::eval_if< \ + mpl::or_<is_actor<x_type>, is_actor<y_type> > \ + , re_curry<eval_name, x_type, y_type> \ + , op_result<x_type, y_type> \ + >::type \ + type; \ + }; \ + \ + template <typename RT, typename Env, typename A0, typename A1> \ + static RT \ + eval(Env const& env, A0& a0, A1& a1) \ + { \ + return expr; \ + } \ + }; + +#undef x +#undef y +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp new file mode 100644 index 0000000..d82a153 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_DETAIL_IO_HPP +#define PHOENIX_OPERATOR_DETAIL_IO_HPP + +#include <boost/spirit/home/phoenix/operator/bitwise.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/utility/addressof.hpp> +#include <boost/utility/enable_if.hpp> +#include <iostream> + +namespace boost { namespace phoenix { namespace detail +{ + typedef char(&no)[1]; + typedef char(&yes)[2]; + + template <typename CharType, typename CharTrait> + yes ostream_test(std::basic_ostream<CharType, CharTrait>*); + no ostream_test(...); + + template <typename CharType, typename CharTrait> + yes istream_test(std::basic_istream<CharType, CharTrait>*); + no istream_test(...); + + template <typename T> + struct is_ostream + { + static T x; + BOOST_STATIC_CONSTANT(bool, + value = sizeof(detail::ostream_test(boost::addressof(x))) == sizeof(yes)); + }; + + template <typename T> + struct is_istream + { + static T x; + BOOST_STATIC_CONSTANT(bool, + value = sizeof(detail::istream_test(boost::addressof(x))) == sizeof(yes)); + }; + + template <typename T0, typename T1> + struct enable_if_ostream : + enable_if< + detail::is_ostream<T0> + , actor< + typename as_composite< + shift_left_eval + , actor<reference<T0> > + , actor<T1> + >::type + > + > + {}; + + template <typename T0, typename T1> + struct enable_if_istream : + enable_if< + detail::is_istream<T0> + , actor< + typename as_composite< + shift_right_eval + , actor<reference<T0> > + , actor<T1> + >::type + > + > + {}; + + typedef std::ios_base& (*iomanip_type)(std::ios_base&); + typedef std::istream& (*imanip_type)(std::istream&); + typedef std::ostream& (*omanip_type)(std::ostream&); +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp new file mode 100644 index 0000000..cb77613 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/arithmetic/sub.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> + +#include <boost/mpl/void.hpp> + +#include <boost/type_traits/function_traits.hpp> + +#include <boost/get_pointer.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp> + +namespace boost { namespace phoenix { + + struct mem_fun_ptr_eval + { + template<typename Env, typename PtrActor, typename MemFunPtrActor, + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(PHOENIX_MEMBER_LIMIT, 2), typename Arg, mpl::void_)> + + struct result + : detail::mem_fun_ptr_return<typename eval_result<MemFunPtrActor, Env>::type> { }; + + template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor> + static typename result<Env,PtrActor,MemFunPtrActor>::type + eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor) + { + return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(); + } + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp")) + +#include BOOST_PP_ITERATE() + + }; +}} + +#endif + +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + +#define PHOENIX_EVAL_ARG(z,n,_) arg ## n.eval(env) + + template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename Arg)> + static typename result<Env,PtrActor,MemFunPtrActor, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION,Arg)>::type + eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor, + BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, Arg, & arg)) + { + return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))( + BOOST_PP_ENUM(PHOENIX_ITERATION,PHOENIX_EVAL_ARG,_)); + } + +#undef PHOENIX_EVAL_ARG +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp new file mode 100644 index 0000000..31d5413 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp> + +namespace boost { namespace phoenix { + template<typename Actor, typename MemFunPtr> + struct mem_fun_ptr_gen + { + mem_fun_ptr_gen( + const Actor& actor, MemFunPtr memFunPtr) + : mActor(actor), mMemFunPtr(memFunPtr) { } + + actor<typename as_composite<mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type>::type> + operator()() const + { + return compose<mem_fun_ptr_eval>( + mActor, as_actor<MemFunPtr>::convert(mMemFunPtr)); + } + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp")) + +#include BOOST_PP_ITERATE() + + Actor mActor; + MemFunPtr mMemFunPtr; + }; +}} + +#endif +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + + template<BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename Arg)> + actor<typename as_composite< + mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, Arg)>::type> + operator()( + BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, const Arg, &arg)) const + { + return compose<mem_fun_ptr_eval>( + mActor, as_actor<MemFunPtr>::convert(mMemFunPtr), + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, arg)); + } + +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp new file mode 100644 index 0000000..102f17f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> + +namespace boost { namespace phoenix { +namespace detail +{ + template<typename MemFunPtr> + struct mem_fun_ptr_return; + + template<typename Ret, typename Class> + struct mem_fun_ptr_return<Ret (Class::*)()> + { + typedef Ret type; + }; + + template<typename Ret, typename Class> + struct mem_fun_ptr_return<Ret (Class::*)() const> + { + typedef Ret type; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp")) + +#include BOOST_PP_ITERATE() + +} +}} + +#endif + +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + + template<typename Ret, typename Class, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)> + struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T))> + { + typedef Ret type; + }; + + template<typename Ret, typename Class, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)> + struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T)) const> + { + typedef Ret type; + }; + +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp new file mode 100644 index 0000000..fd9a8c7 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_DETAIL_UNARY_COMPOSE_HPP +#define PHOENIX_OPERATOR_DETAIL_UNARY_COMPOSE_HPP + +#define PHOENIX_UNARY_COMPOSE(eval_name, op) \ + template <typename T0> \ + inline actor<typename as_composite<eval_name, actor<T0> >::type> \ + operator op (actor<T0> const& a0) \ + { \ + return compose<eval_name>(a0); \ + } + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp new file mode 100644 index 0000000..501f6df --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_DETAIL_UNARY_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_UNARY_EVAL_HPP + +#include <boost/mpl/eval_if.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#define PHOENIX_UNARY_EVAL(eval_name, op_result, expr) \ + struct eval_name \ + { \ + template <typename Env, typename A0> \ + struct result \ + { \ + typedef typename A0::template result<Env>::type x_type; \ + \ + typedef typename \ + mpl::eval_if< \ + is_actor<x_type> \ + , re_curry<eval_name, x_type> \ + , op_result<x_type> \ + >::type \ + type; \ + }; \ + \ + template <typename RT, typename Env, typename A0> \ + static RT \ + eval(Env const& env, A0& a0) \ + { \ + return expr; \ + } \ + }; + +#endif + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp new file mode 100644 index 0000000..8492e90 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_IF_ELSE_HPP +#define PHOENIX_OPERATOR_IF_ELSE_HPP + +#include <boost/mpl/and.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> + +namespace boost { namespace phoenix +{ + BOOST_BINARY_RESULT_OF(true ? x : y, result_of_if_else) + + struct if_else_op_eval + { + template < + typename Env + , typename Cond + , typename Then + , typename Else + > + struct result + { + typedef typename Then::template result<Env>::type then_type; + typedef typename Else::template result<Env>::type else_type; + + typedef typename + result_of_if_else<then_type, else_type>::type + ite_result; + + // Note: c ? x : y can return an lvalue! Allow if_else_op_eval + // to return an lvalue IFF then_type and else_type are both lvalues + // with the same type. + + typedef typename + mpl::if_< + mpl::and_< + is_same<then_type, else_type> + , is_reference<then_type> + > + , ite_result + , typename remove_reference<ite_result>::type + >::type + type; + }; + + template < + typename RT + , typename Env + , typename Cond + , typename Then + , typename Else + > + static RT + eval(Env const& env, Cond& cond, Then& then, Else& else_) + { + return cond.eval(env) ? then.eval(env) : else_.eval(env); + } + }; + + template <typename Cond, typename Then, typename Else> + inline actor<typename as_composite<if_else_op_eval, Cond, Then, Else>::type> + if_else(Cond const& cond, Then const& then, Else const& else_) + { + return compose<if_else_op_eval>(cond, then, else_); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp new file mode 100644 index 0000000..360a46f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_IO_HPP +#define PHOENIX_OPERATOR_IO_HPP + +#include <boost/spirit/home/phoenix/operator/detail/io.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// overloads for std::basic_ostream and std::basic_istream +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T0, typename T1> + inline typename detail::enable_if_ostream<T0, T1>::type + operator<<(T0& a0, actor<T1> const& a1) + { + return compose<shift_left_eval>(phoenix::ref(a0), a1); + } + + template <typename T0, typename T1> + inline typename detail::enable_if_istream<T0, T1>::type + operator>>(T0& a0, actor<T1> const& a1) + { + return compose<shift_right_eval>(phoenix::ref(a0), a1); + } + + // resolve ambiguities with fusion. + template <typename T1> + inline typename detail::enable_if_ostream<std::ostream, T1>::type + operator<<(std::ostream& a0, actor<T1> const& a1) + { + return compose<shift_left_eval>(phoenix::ref(a0), a1); + } + + template <typename T1> + inline typename detail::enable_if_istream<std::istream, T1>::type + operator>>(std::istream& a0, actor<T1> const& a1) + { + return compose<shift_right_eval>(phoenix::ref(a0), a1); + } + +/////////////////////////////////////////////////////////////////////////////// +// +// overloads for I/O manipulators. +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T0> + inline actor<typename as_composite< + shift_left_eval, actor<T0>, detail::omanip_type>::type> + operator<<(actor<T0> const& a0, detail::omanip_type a1) + { + return compose<shift_left_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_left_eval, actor<T0>, detail::iomanip_type>::type> + operator<<(actor<T0> const& a0, detail::iomanip_type a1) + { + return compose<shift_left_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_right_eval, actor<T0>, detail::imanip_type>::type> + operator>>(actor<T0> const& a0, detail::imanip_type a1) + { + return compose<shift_right_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_right_eval, actor<T0>, detail::iomanip_type>::type> + operator>>(actor<T0> const& a0, detail::iomanip_type a1) + { + return compose<shift_right_eval>(a0, a1); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp new file mode 100644 index 0000000..84619aa --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_LOGICAL_HPP +#define PHOENIX_OPERATOR_LOGICAL_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct logical_not_eval; + struct logical_and_eval; + struct logical_or_eval; + + BOOST_UNARY_RESULT_OF(!x, result_of_logical_not) + BOOST_BINARY_RESULT_OF(x && y, result_of_logical_and) + BOOST_BINARY_RESULT_OF(x || y, result_of_logical_or) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(logical_not_eval, result_of_logical_not, !x) + PHOENIX_BINARY_EVAL(logical_and_eval, result_of_logical_and, x && y) + PHOENIX_BINARY_EVAL(logical_or_eval, result_of_logical_or, x || y) + + PHOENIX_UNARY_COMPOSE(logical_not_eval, !) + PHOENIX_BINARY_COMPOSE(logical_and_eval, &&) + PHOENIX_BINARY_COMPOSE(logical_or_eval, ||) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp new file mode 100644 index 0000000..27f3e8d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp @@ -0,0 +1,145 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ + +#ifndef PHOENIX_OPERATOR_MEMBER_HPP +#define PHOENIX_OPERATOR_MEMBER_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_member_pointer.hpp> +#include <boost/type_traits/is_member_function_pointer.hpp> + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/not.hpp> + +#include <boost/utility/enable_if.hpp> + +#include <boost/get_pointer.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp> + +#include <memory> + +namespace boost { + template<typename T> class shared_ptr; + template<typename T> class scoped_ptr; + +namespace phoenix { + namespace detail + { + template<typename T> + struct member_type; + + template<typename Class, typename MemberType> + struct member_type<MemberType (Class::*)> + { + typedef MemberType type; + }; + } + + namespace meta + { + template<typename T> + struct pointed_type; + + template<typename T> + struct pointed_type<T*> + { + typedef T type; + }; + + template<typename T> + struct pointed_type<shared_ptr<T> > + { + typedef T type; + }; + + template<typename T> + struct pointed_type<scoped_ptr<T> > + { + typedef T type; + }; + + template<typename T> + struct pointed_type<std::auto_ptr<T> > + { + typedef T type; + }; + } + + struct member_object_eval + { + template<typename Env, typename PtrActor, typename MemPtrActor> + struct result + { + typedef typename detail::member_type< + typename eval_result<MemPtrActor, Env>::type>::type member_type; + + typedef typename meta::pointed_type< + typename remove_reference< + typename eval_result<PtrActor, Env>::type>::type>::type object_type; + + typedef typename add_reference< + typename mpl::eval_if< + is_const<object_type>, + add_const<member_type>, + mpl::identity<member_type> >::type>::type type; + }; + + template<typename Rt, typename Env, typename PtrActor, typename MemPtrActor> + static typename result<Env,PtrActor,MemPtrActor>::type + eval(const Env& env, PtrActor& ptrActor, MemPtrActor& memPtrActor) + { + return get_pointer(ptrActor.eval(env))->*memPtrActor.eval(env); + } + }; + + namespace member_object + { + template<typename T0, typename MemObjPtr> + typename enable_if< + mpl::and_<is_member_pointer<MemObjPtr>, mpl::not_<is_member_function_pointer<MemObjPtr> > >, + actor<typename as_composite< + member_object_eval, actor<T0>, + typename as_actor<MemObjPtr>::type>::type> >::type + operator->*( + const actor<T0>& ptrActor, + MemObjPtr memObjPtr) + { + return compose<member_object_eval>( + ptrActor, + as_actor<MemObjPtr>::convert(memObjPtr)); + } + } + + namespace member_function + { + template<typename T0, typename MemFunPtr> + typename enable_if< + is_member_function_pointer<MemFunPtr>, + mem_fun_ptr_gen<actor<T0>, MemFunPtr> >::type + operator->*(const actor<T0>& ptrActor, MemFunPtr memFunPtr) + { + return mem_fun_ptr_gen<actor<T0>, MemFunPtr>( + ptrActor, memFunPtr); + } + } + + using member_object::operator->*; + using member_function::operator->*; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp new file mode 100644 index 0000000..294adf6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_OPERATOR_SELF_HPP +#define PHOENIX_OPERATOR_SELF_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct reference_eval; + struct dereference_eval; + struct assign_eval; + struct index_eval; + + BOOST_UNARY_RESULT_OF(&x, result_of_reference) + BOOST_UNARY_RESULT_OF(*x, result_of_dereference) + BOOST_BINARY_RESULT_OF(x = y, result_of_assign) + BOOST_ASYMMETRIC_BINARY_RESULT_OF(x[y], result_of_index) + + namespace detail + { + template <typename T0, typename T1> + struct make_assign_composite + { + typedef actor<typename as_composite<assign_eval, T0, T1>::type> type; + }; + + template <typename T0, typename T1> + struct make_index_composite + { + typedef actor<typename as_composite<index_eval, T0, T1>::type> type; + }; + } + + template <typename Base> + template <typename T1> + typename detail::make_assign_composite<actor<Base>, T1>::type + actor<Base>::operator=(T1 const& a1) const + { + return compose<assign_eval>(*this, a1); + } + + template <typename Base> + template <typename T1> + typename detail::make_index_composite<actor<Base>, T1>::type + actor<Base>::operator[](T1 const& a1) const + { + return compose<index_eval>(*this, a1); + } + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(reference_eval, result_of_reference, &x) + PHOENIX_UNARY_EVAL(dereference_eval, result_of_dereference, *x) + PHOENIX_UNARY_COMPOSE(reference_eval, &) + PHOENIX_UNARY_COMPOSE(dereference_eval, *) + + PHOENIX_BINARY_EVAL(assign_eval, result_of_assign, x = y) + PHOENIX_BINARY_EVAL(index_eval, result_of_index, x[y]) +}} + +#undef x +#undef y +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp new file mode 100644 index 0000000..c1b9ae3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_HPP +#define PHOENIX_SCOPE_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/lambda.hpp> +#include <boost/spirit/home/phoenix/scope/let.hpp> +#include <boost/spirit/home/phoenix/scope/local_variable.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp new file mode 100644 index 0000000..6a74df6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +// Allow multiple inclusion. let.hpp and lambda.hpp will have the guards + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> + +#define PHOENIX_LOCAL_GEN_PARAM(z, n, data) \ + actor<composite<assign_eval \ + , fusion::vector<local_variable<K##n>, V##n> > > const& a##n + +#define PHOENIX_LOCAL_GEN_ACTOR(z, n, data) \ + fusion::at_c<1>(a##n) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_LOCAL_LIMIT, \ + "boost/spirit/home/phoenix/scope/detail/local_gen.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_LOCAL_GEN_PARAM +#undef PHOENIX_LOCAL_GEN_ACTOR + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename V) + > + PHOENIX_LOCAL_GEN_NAME< + fusion::vector<BOOST_PP_ENUM_PARAMS(N, V)> + , detail::map_local_index_to_tuple<BOOST_PP_ENUM_PARAMS(N, K)> + > + operator()( + BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_PARAM, _) + ) const + { + return fusion::vector<BOOST_PP_ENUM_PARAMS(N, V)>( + BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_ACTOR, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp new file mode 100644 index 0000000..1ad7932 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp @@ -0,0 +1,198 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_DETAIL_LOCAL_VARIABLE_HPP +#define PHOENIX_SCOPE_DETAIL_LOCAL_VARIABLE_HPP + +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/size.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/value_at.hpp> +#include <boost/preprocessor/enum.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_reference.hpp> + +#define PHOENIX_MAP_LOCAL_TEMPLATE_PARAM(z, n, data) \ + typename T##n = unused<n> + +#define PHOENIX_MAP_LOCAL_DISPATCH(z, n, data) \ + typedef char(&result##n)[n+2]; \ + static result##n get(T##n*); + +namespace boost { namespace phoenix +{ + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct scoped_environment; + + namespace detail + { + template <typename Env> + struct initialize_local + { + template <class F> + struct result; + + template <class F, class Actor> + struct result<F(Actor)> + { + typedef typename remove_reference<Actor>::type actor_type; + typedef typename actor_type::template result<Env>::type type; + }; + + initialize_local(Env const& env) + : env(env) {} + + template <typename Actor> + typename result<initialize_local(Actor)>::type + operator()(Actor const& actor) const + { + return actor.eval(env); + } + + Env const& env; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + initialize_local& operator= (initialize_local const&); + }; + + template <typename T> + struct is_scoped_environment : mpl::false_ {}; + + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct is_scoped_environment<scoped_environment<Env, OuterEnv, Locals, Map> > + : mpl::true_ {}; + + template <int N> + struct unused; + + template <BOOST_PP_ENUM( + PHOENIX_LOCAL_LIMIT, PHOENIX_MAP_LOCAL_TEMPLATE_PARAM, _)> + struct map_local_index_to_tuple + { + typedef char(¬_found)[1]; + static not_found get(...); + + BOOST_PP_REPEAT(PHOENIX_LOCAL_LIMIT, PHOENIX_MAP_LOCAL_DISPATCH, _) + }; + + template<typename T> + T* generate_pointer(); + + template <typename Map, typename Tag> + struct get_index + { + BOOST_STATIC_CONSTANT(int, + value = ( + static_cast<int>((sizeof(Map::get(generate_pointer<Tag>()))) / sizeof(char)) - 2 + )); + + // if value == -1, Tag is not found + typedef mpl::int_<value> type; + }; + + template <typename Local, typename Env> + struct apply_local; + + template <typename Local, typename Env> + struct outer_local + { + typedef typename + apply_local<Local, typename Env::outer_env_type>::type + type; + }; + + template <typename Locals, typename Index> + struct get_local_or_void + { + typedef typename + mpl::eval_if< + mpl::less<Index, mpl::size<Locals> > + , fusion::result_of::at<Locals, Index> + , mpl::identity<fusion::void_> + >::type + type; + }; + + template <typename Local, typename Env, typename Index> + struct get_local_from_index + { + typedef typename + mpl::eval_if< + mpl::equal_to<Index, mpl::int_<-1> > + , outer_local<Local, Env> + , get_local_or_void<typename Env::locals_type, Index> + >::type + type; + }; + + template <typename Local, typename Env> + struct get_local + { + typedef typename + get_index< + typename Env::map_type, typename Local::key_type>::type + index_type; + + typedef typename + get_local_from_index<Local, Env, index_type>::type + type; + }; + + template <typename Local, typename Env> + struct apply_local + { + // $$$ TODO: static assert that Env is a scoped_environment $$$ + typedef typename get_local<Local, Env>::type type; + }; + + template <typename Key> + struct eval_local + { + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index, mpl::false_) + { + return RT(fusion::at<Index>(env.locals)); + } + + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index index, mpl::true_) + { + typedef typename + get_index<typename Env::outer_env_type::map_type, Key>::type + index_type; + + return get<RT>( + env.outer_env + , index_type() + , mpl::equal_to<index_type, mpl::int_<-1> >()); + } + + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index index) + { + return get<RT>( + env + , index + , mpl::equal_to<Index, mpl::int_<-1> >()); + } + }; + } +}} + +#undef PHOENIX_MAP_LOCAL_TEMPLATE_PARAM +#undef PHOENIX_MAP_LOCAL_DISPATCH +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp new file mode 100644 index 0000000..c4a7ce8 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp @@ -0,0 +1,176 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_LAMBDA_HPP +#define PHOENIX_SCOPE_LAMBDA_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/as_vector.hpp> + +namespace boost { namespace phoenix +{ + template <typename Base, typename OuterEnv, typename Locals, typename Map> + struct lambda_eval : Base + { + template <typename Env> + struct result + { + typedef typename Base::template + result<scoped_environment<Env, OuterEnv, Locals, Map> >::type + result_type; + + typedef typename + detail::unwrap_local_reference<result_type>::type + type; + }; + + lambda_eval( + Base const& base + , OuterEnv const& outer_env + , Locals const& locals) + : Base(base) + , outer_env(outer_env) + , locals(locals) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type RT; + return RT(Base::eval( + scoped_environment<Env, OuterEnv, Locals, Map>( + env, outer_env, locals))); + } + + OuterEnv outer_env; + mutable Locals locals; + }; + + template <typename Base, typename Vars, typename Map> + struct lambda_actor + { + typedef typename + mpl::fold< + Vars + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + typedef actor<lambda_eval<Base, Env, locals_type, Map> > type; + }; + + lambda_actor(Base const& f, Vars const& vars) + : f(f), vars(vars) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type result_type; + + return result_type( + f, env, fusion::as_vector( + fusion::transform( + vars + , detail::initialize_local<Env>(env) + ))); + } + + Base f; + Vars vars; + }; + + template <typename Vars, typename Map> + struct lambda_actor_gen + { + template <typename Base> + actor<lambda_actor<Base, Vars, Map> > const + operator[](actor<Base> const& f) const + { + return lambda_actor<Base, Vars, Map>(f, vars); + } + + lambda_actor_gen(Vars const& vars) + : vars(vars) {} + + Vars vars; + }; + + template <typename Key> + struct local_variable; // forward + struct assign_eval; // forward + + struct lambda_gen + : lambda_actor_gen< + fusion::vector<> + , detail::map_local_index_to_tuple<> > + { + typedef + lambda_actor_gen< + fusion::vector<> + , detail::map_local_index_to_tuple<> > + base_type; + + lambda_gen() + : base_type(fusion::vector<>()) + { + } + + template <typename K0, typename V0> + lambda_actor_gen< + fusion::vector<V0> + , detail::map_local_index_to_tuple<K0> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + ) const + { + return fusion::vector<V0>(fusion::at_c<1>(a0)); + } + + template <typename K0, typename K1, typename V0, typename V1> + lambda_actor_gen< + fusion::vector<V0, V1> + , detail::map_local_index_to_tuple<K0, K1> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + , actor<composite<assign_eval, fusion::vector<local_variable<K1>, V1> > > const& a1 + ) const + { + return fusion::vector<V0, V1>(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); + } + + // Bring in the rest... + #define PHOENIX_LOCAL_GEN_NAME lambda_actor_gen + #include <boost/spirit/home/phoenix/scope/detail/local_gen.hpp> + #undef PHOENIX_LOCAL_GEN_NAME + }; + + lambda_gen const lambda = lambda_gen(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp new file mode 100644 index 0000000..40e951a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp @@ -0,0 +1,145 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_LET_HPP +#define PHOENIX_SCOPE_LET_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename Base, typename Vars, typename Map> + struct let_actor : Base + { + typedef typename + mpl::fold< + Vars + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + typedef typename Base::template + result<scoped_environment<Env, Env, locals_type, Map> >::type + result_type; + + typedef typename + detail::unwrap_local_reference<result_type>::type + type; + }; + + let_actor(Base const& base, Vars const& vars) + : Base(base), vars(vars) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + locals_type locals = + fusion::as_vector( + fusion::transform( + vars + , detail::initialize_local<Env>(env))); + + typedef typename result<Env>::type RT; + return RT(Base::eval( + scoped_environment<Env, Env, locals_type, Map>( + env + , env + , locals))); + } + + Vars vars; + }; + + template <typename Vars, typename Map> + struct let_actor_gen + { + template <typename Base> + actor<let_actor<Base, Vars, Map> > const + operator[](actor<Base> const& base) const + { + return let_actor<Base, Vars, Map>(base, vars); + } + + let_actor_gen(Vars const& vars) + : vars(vars) {} + + Vars vars; + }; + + template <typename Key> + struct local_variable; // forward + struct assign_eval; // forward + + struct let_gen + { + template <typename K0, typename V0> + let_actor_gen< + fusion::vector<V0> + , detail::map_local_index_to_tuple<K0> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + ) const + { + return fusion::vector<V0>(fusion::at_c<1>(a0)); + } + + template <typename K0, typename K1, typename V0, typename V1> + let_actor_gen< + fusion::vector<V0, V1> + , detail::map_local_index_to_tuple<K0, K1> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + , actor<composite<assign_eval, fusion::vector<local_variable<K1>, V1> > > const& a1 + ) const + { + return fusion::vector<V0, V1>(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); + } + + // Bring in the rest... + #define PHOENIX_LOCAL_GEN_NAME let_actor_gen + #include <boost/spirit/home/phoenix/scope/detail/local_gen.hpp> + #undef PHOENIX_LOCAL_GEN_NAME + }; + + let_gen const let = let_gen(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp new file mode 100644 index 0000000..5987ed4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp @@ -0,0 +1,111 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_LOCAL_VARIABLE_HPP +#define PHOENIX_SCOPE_LOCAL_VARIABLE_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename Key> + struct local_variable + { + typedef Key key_type; + + // This will prevent actor::operator()() from kicking in. + // Actually, we do not need all actor::operator()s for + // all arities, but this will suffice. The nullary + // actor::operator() is particularly troublesome because + // it is always eagerly evaluated by the compiler. + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result : detail::apply_local<local_variable<Key>, Env> {}; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type return_type; + typedef typename + detail::get_index<typename Env::map_type, Key>::type + index_type; + typedef detail::eval_local<Key> eval_local; + + return eval_local::template get<return_type>( + env + , index_type()); + } + + private: + // silence MSVC warning C4512: assignment operator could not be generated + local_variable& operator= (local_variable const&); + }; + + namespace local_names + { + actor<local_variable<struct _a_key> > const _a + = local_variable<struct _a_key>(); + actor<local_variable<struct _b_key> > const _b + = local_variable<struct _b_key>(); + actor<local_variable<struct _c_key> > const _c + = local_variable<struct _c_key>(); + actor<local_variable<struct _d_key> > const _d + = local_variable<struct _d_key>(); + actor<local_variable<struct _e_key> > const _e + = local_variable<struct _e_key>(); + actor<local_variable<struct _f_key> > const _f + = local_variable<struct _f_key>(); + actor<local_variable<struct _g_key> > const _g + = local_variable<struct _g_key>(); + actor<local_variable<struct _h_key> > const _h + = local_variable<struct _h_key>(); + actor<local_variable<struct _i_key> > const _i + = local_variable<struct _i_key>(); + actor<local_variable<struct _j_key> > const _j + = local_variable<struct _j_key>(); + actor<local_variable<struct _k_key> > const _k + = local_variable<struct _k_key>(); + actor<local_variable<struct _l_key> > const _l + = local_variable<struct _l_key>(); + actor<local_variable<struct _m_key> > const _m + = local_variable<struct _m_key>(); + actor<local_variable<struct _n_key> > const _n + = local_variable<struct _n_key>(); + actor<local_variable<struct _o_key> > const _o + = local_variable<struct _o_key>(); + actor<local_variable<struct _p_key> > const _p + = local_variable<struct _p_key>(); + actor<local_variable<struct _q_key> > const _q + = local_variable<struct _q_key>(); + actor<local_variable<struct _r_key> > const _r + = local_variable<struct _r_key>(); + actor<local_variable<struct _s_key> > const _s + = local_variable<struct _s_key>(); + actor<local_variable<struct _t_key> > const _t + = local_variable<struct _t_key>(); + actor<local_variable<struct _u_key> > const _u + = local_variable<struct _u_key>(); + actor<local_variable<struct _v_key> > const _v + = local_variable<struct _v_key>(); + actor<local_variable<struct _w_key> > const _w + = local_variable<struct _w_key>(); + actor<local_variable<struct _x_key> > const _x + = local_variable<struct _x_key>(); + actor<local_variable<struct _y_key> > const _y + = local_variable<struct _y_key>(); + actor<local_variable<struct _z_key> > const _z + = local_variable<struct _z_key>(); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp new file mode 100644 index 0000000..b23f9ee --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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) +==============================================================================*/ +#ifndef PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP +#define PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP + +namespace boost { namespace phoenix +{ + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct scoped_environment + { + typedef Env env_type; + typedef OuterEnv outer_env_type; + typedef Locals locals_type; + typedef Map map_type; + typedef typename Env::args_type args_type; + typedef typename Env::tie_type tie_type; + + scoped_environment( + Env const& env + , OuterEnv const& outer_env + , Locals& locals) + : env(env) + , outer_env(outer_env) + , locals(locals) {} + + tie_type const& + args() const + { + return env.args(); + } + + Env const& env; + OuterEnv const& outer_env; + Locals& locals; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + scoped_environment& operator= (scoped_environment const&); + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp new file mode 100644 index 0000000..c29baf8 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2005-2008 Hartmut Kaiser + Copyright (c) 2005-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_VERSION_HPP +#define PHOENIX_VERSION_HPP + +/////////////////////////////////////////////////////////////////////////////// +// +// This is the version of the library +// +/////////////////////////////////////////////////////////////////////////////// +#define BOOST_PHOENIX_VERSION 0x2000 // 2.0.0 + +#endif |