diff options
Diffstat (limited to 'libcutl/cutl/details/boost/mpl')
103 files changed, 7837 insertions, 0 deletions
diff --git a/libcutl/cutl/details/boost/mpl/always.hpp b/libcutl/cutl/details/boost/mpl/always.hpp new file mode 100644 index 0000000..a7b78d2 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/always.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED +#define BOOST_MPL_ALWAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <cutl/details/boost/mpl/aux_/na.hpp> +#include <cutl/details/boost/mpl/aux_/arity_spec.hpp> + +namespace cutl_details_boost { namespace mpl { + +template< typename Value > struct always +{ +    template< +          typename T +        BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na) +        > +    struct apply +    { +        typedef Value type; +    }; +}; + +BOOST_MPL_AUX_ARITY_SPEC(1, always) + +}} + +#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/and.hpp b/libcutl/cutl/details/boost/mpl/and.hpp new file mode 100644 index 0000000..f5f6dc9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/and.hpp @@ -0,0 +1,60 @@ + +#ifndef BOOST_MPL_AND_HPP_INCLUDED +#define BOOST_MPL_AND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/nested_type_wknd.hpp> +#   include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> + +// agurt, 19/may/04: workaround a conflict with <iso646.h> header's  +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' +// has to be checked in a separate condition, otherwise GCC complains  +// about 'and' being an alternative token +#if defined(_MSC_VER)  +#ifndef __GCCXML__ +#if defined(and)  +#   pragma push_macro("and") +#   undef and +#   define and(x) +#endif +#endif +#endif + +#   define BOOST_MPL_PREPROCESSED_HEADER and.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#if defined(_MSC_VER) +#ifndef __GCCXML__ +#if defined(and)  +#   pragma pop_macro("and") +#endif +#endif +#endif + +#else + +#   define AUX778076_OP_NAME and_ +#   define AUX778076_OP_VALUE1 false +#   define AUX778076_OP_VALUE2 true +#   include <cutl/details/boost/mpl/aux_/logical_op.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/apply.hpp b/libcutl/cutl/details/boost/mpl/apply.hpp new file mode 100644 index 0000000..d1e7f0b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/apply.hpp @@ -0,0 +1,229 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_HPP_INCLUDED +#define BOOST_MPL_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/apply_fwd.hpp> +#   include <cutl/details/boost/mpl/apply_wrap.hpp> +#   include <cutl/details/boost/mpl/placeholders.hpp> +#   include <cutl/details/boost/mpl/lambda.hpp> +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER apply.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/partial_spec_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/config/lambda.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#   include <cutl/details/boost/mpl/aux_/config/eti.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +namespace cutl_details_boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +#   define AUX778076_APPLY_PARAMS(param) \ +    BOOST_MPL_PP_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        ) \ +    /**/ + +#   define AUX778076_APPLY_DEF_PARAMS(param, value) \ +    BOOST_MPL_PP_DEFAULT_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        , value \ +        ) \ +    /**/ + +#   define AUX778076_APPLY_N_PARAMS(n, param) \ +    BOOST_MPL_PP_PARAMS(n, param) \ +    /**/ + +#   define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ +    BOOST_PP_COMMA_IF(n) \ +    BOOST_MPL_PP_PARAMS(n, param) \ +    /**/ + +#   define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ +    BOOST_PP_COMMA_IF(n) \ +    BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ +    /**/ +     +#   define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ +    BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ +    /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/apply.hpp>)) +#include BOOST_PP_ITERATE() + +#   if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +// real C++ version is already taken care of +#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX apply +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include <cutl/details/boost/mpl/aux_/count_args.hpp> +} + + +template< +      typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) +    > +struct apply +    : aux::apply_chooser<  +          aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value +        >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type +{ +}; + +#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#   endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#   undef AUX778076_APPLY_N_SPEC_PARAMS +#   undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS +#   undef AUX778076_APPLY_N_COMMA_PARAMS +#   undef AUX778076_APPLY_N_PARAMS +#   undef AUX778076_APPLY_DEF_PARAMS +#   undef AUX778076_APPLY_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +#   define i_ BOOST_PP_FRAME_ITERATION(1) + +template< +      typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply,i_) +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    : BOOST_PP_CAT(apply_wrap,i_)<  +          typename lambda<F>::type +        AUX778076_APPLY_N_COMMA_PARAMS(i_, T) +        > +{ +#else +{ +    typedef typename BOOST_PP_CAT(apply_wrap,i_)<  +          typename lambda<F>::type +        AUX778076_APPLY_N_COMMA_PARAMS(i_, T) +        >::type type; +#endif +    BOOST_MPL_AUX_LAMBDA_SUPPORT( +          BOOST_PP_INC(i_) +        , BOOST_PP_CAT(apply,i_) +        , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) +        ) +}; + + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)> +{ +    typedef int type; +}; +#endif + +#   if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< +      typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) +    > +struct apply +    : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#else +template< +      typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) +    > +struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > +    : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#endif + +#   else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +namespace aux { + +template<> +struct apply_chooser<i_> +{ +    template< +          typename F, AUX778076_APPLY_PARAMS(typename T) +        > +    struct result_ +    { +        typedef BOOST_PP_CAT(apply,i_)< +              F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) +            > type; +    }; +}; + +} // namespace aux +#endif + +#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#   endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#   undef i_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/apply_fwd.hpp b/libcutl/cutl/details/boost/mpl/apply_fwd.hpp new file mode 100644 index 0000000..769b1fa --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/apply_fwd.hpp @@ -0,0 +1,107 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED +#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC +// (for known reasons) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#   define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#endif + +namespace cutl_details_boost { namespace mpl { + +// local macro, #undef-ined at the end of the header +#   define AUX778076_APPLY_DEF_PARAMS(param, value) \ +    BOOST_MPL_PP_DEFAULT_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        , value \ +        ) \ +    /**/ + +#   define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ +    BOOST_PP_COMMA_IF(n) \ +    BOOST_MPL_PP_PARAMS(n, param) \ +    /**/ + +#   if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< +      typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) +    > +struct apply; +#else +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} +#endif + +#   endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/apply_fwd.hpp>)) +#include BOOST_PP_ITERATE() + + +#   undef AUX778076_APPLY_N_COMMA_PARAMS +#   undef AUX778076_APPLY_DEF_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< +      typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/apply_wrap.hpp b/libcutl/cutl/details/boost/mpl/apply_wrap.hpp new file mode 100644 index 0000000..d1fb246 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/apply_wrap.hpp @@ -0,0 +1,234 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED +#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ +// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49272 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/aux_/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/has_apply.hpp> +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#   include <cutl/details/boost/mpl/aux_/msvc_never_true.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/add.hpp> +#   include <cutl/details/boost/mpl/aux_/config/bcc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#   include <cutl/details/boost/mpl/aux_/config/eti.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/logical/and.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> + + +namespace cutl_details_boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +#   define AUX778076_APPLY_WRAP_PARAMS(n, param) \ +    BOOST_MPL_PP_PARAMS(n, param) \ +    /**/ + +#   define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ +    BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ +    /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/apply_wrap.hpp>)) +#include BOOST_PP_ITERATE() + + +#   undef AUX778076_APPLY_WRAP_SPEC_PARAMS +#   undef AUX778076_APPLY_WRAP_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +#   define i_ BOOST_PP_FRAME_ITERATION(1) + +#   if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// MSVC version + +#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) +#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply +#define AUX778076_MSVC_DTW_ARITY i_ +#include <cutl/details/boost/mpl/aux_/msvc_dtw.hpp> + +template< +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply_wrap,i_) +{ +    // Metafunction forwarding confuses vc6 +    typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_< +          AUX778076_APPLY_WRAP_PARAMS(i_, T) +        >::type type; +}; + +#   elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +// MWCW/Borland version + +template< +      int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply_wrap_impl,i_); + +#define BOOST_PP_ITERATION_PARAMS_2 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <cutl/details/boost/mpl/apply_wrap.hpp>)) +#include BOOST_PP_ITERATE() + +template< +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply_wrap,i_) +    : BOOST_PP_CAT(apply_wrap_impl,i_)< +          ::cutl_details_boost::mpl::aux::arity<F,i_>::value +        , F +        BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) +        >::type +{ +}; + +#   else +// ISO98 C++, with minor concession to vc7 + +template< +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +#if i_ == 0 +    , typename has_apply_ = typename aux::has_apply<F>::type +#endif +    > +struct BOOST_PP_CAT(apply_wrap,i_) +// metafunction forwarding confuses MSVC 7.0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) +    : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > +{ +#else +{     +    typedef typename F::template apply< +         AUX778076_APPLY_WRAP_PARAMS(i_, T) +        >::type type; +#endif +}; + +#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename F > +struct BOOST_PP_CAT(apply_wrap,i_)<F,true_> +    : F::apply +{ +}; +#endif + +#   endif // workarounds + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)> +{ +    typedef int type; +}; +#endif + +#   undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +#   define j_ BOOST_PP_FRAME_ITERATION(2) + +#if i_ == 0 && j_ == 0 \ +    && defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ +    && !defined(BOOST_MPL_CFG_NO_HAS_APPLY) + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { +    typedef typename F::template apply< na > type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F, true > { +    typedef typename F::apply type; +}; + +template< +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< +          BOOST_MPL_PP_ADD(i_, j_) +        , F +        BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) +        > +{ +    typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; +}; +#else + +template< +      typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< +          BOOST_MPL_PP_ADD(i_, j_) +        , F +        BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) +        > +{ +    typedef typename F::template apply< +          AUX778076_APPLY_WRAP_PARAMS(i_, T) +#if i_ == 0 && j_ == 0 +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes +        na +#else +        BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) +#endif +        > type; +}; + +#endif + +#   undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/arg.hpp b/libcutl/cutl/details/boost/mpl/arg.hpp new file mode 100644 index 0000000..aa96c8b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/arg.hpp @@ -0,0 +1,131 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_ARG_HPP_INCLUDED +#define BOOST_MPL_ARG_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/arg_fwd.hpp> +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#   include <cutl/details/boost/mpl/aux_/na_assert.hpp> +#   include <cutl/details/boost/mpl/aux_/arity_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/arg_typedef.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER arg.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/config/lambda.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// local macro, #undef-ined at the end of the header +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#   define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ +    BOOST_MPL_PP_DEFAULT_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        , value \ +        ) \ +    /**/ +#else +#   define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ +    BOOST_MPL_PP_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        ) \ +    /**/ +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/arg.hpp>)) +#include BOOST_PP_ITERATE() + + +#   undef AUX778076_ARG_N_DEFAULT_PARAMS + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_ARG_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +template<> struct arg<i_> +{ +    BOOST_STATIC_CONSTANT(int, value = i_); +    typedef arg<BOOST_PP_INC(i_)> next; +    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) +    BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + +    template< +          AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) +        > +    struct apply +    { +        typedef BOOST_PP_CAT(U,i_) type; +        BOOST_MPL_AUX_ASSERT_NOT_NA(type); +    }; +}; + +#else + +template<> struct arg<-1> +{ +    BOOST_STATIC_CONSTANT(int, value = -1); +    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) +    BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + +    template< +          AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) +        > +    struct apply +    { +        typedef U1 type; +        BOOST_MPL_AUX_ASSERT_NOT_NA(type); +    }; +}; + +#endif // i_ > 0 + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/arg_fwd.hpp b/libcutl/cutl/details/boost/mpl/arg_fwd.hpp new file mode 100644 index 0000000..75fe65f --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/arg_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED +#define BOOST_MPL_ARG_FWD_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) + +#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/assert.hpp b/libcutl/cutl/details/boost/mpl/assert.hpp new file mode 100644 index 0000000..e810ec9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/assert.hpp @@ -0,0 +1,438 @@ + +#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED +#define BOOST_MPL_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: assert.hpp 84442 2013-05-23 14:38:22Z steven_watanabe $ +// $Date: 2013-05-23 07:38:22 -0700 (Thu, 23 May 2013) $ +// $Revision: 84442 $ + +#include <cutl/details/boost/mpl/not.hpp> +#include <cutl/details/boost/mpl/aux_/value_wknd.hpp> +#include <cutl/details/boost/mpl/aux_/nested_type_wknd.hpp> +#include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#include <cutl/details/boost/mpl/aux_/na.hpp> +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +#include <cutl/details/boost/mpl/aux_/config/nttp.hpp> +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/pp_counter.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#include <cutl/details/boost/preprocessor/cat.hpp> + +#include <cutl/details/boost/config.hpp> // make sure 'size_t' is placed into 'std' +#include <cstddef> + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#include <cutl/details/boost/mpl/if.hpp> +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +    || (BOOST_MPL_CFG_GCC != 0) \ +    || BOOST_WORKAROUND(__IBMCPP__, <= 600) +#   define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES +#endif + +#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ +    || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ +    || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +    || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#   define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER +#endif + +// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)  +// and GCC (which issues "unused variable" warnings when static constants are used  +// at a function scope) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +    || (BOOST_MPL_CFG_GCC != 0) +#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } +#else +#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) +#endif + + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct failed {}; + +// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept  +// 'assert<false>' by reference; can't apply it unconditionally -- apparently it +// degrades the quality of GCC diagnostics +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) +#   define AUX778076_ASSERT_ARG(x) x& +#else +#   define AUX778076_ASSERT_ARG(x) x +#endif + +template< bool C >  struct assert        { typedef void* type; }; +template<>          struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; }; + +template< bool C > +int assertion_failed( typename assert<C>::type ); + +template< bool C > +struct assertion +{ +    static int failed( assert<false> ); +}; + +template<> +struct assertion<true> +{ +    static int failed( void* ); +}; + +struct assert_ +{ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +    template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; +#endif +    static assert_ const arg; +    enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; + + +#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +bool operator==( failed, failed ); +bool operator!=( failed, failed ); +bool operator>( failed, failed ); +bool operator>=( failed, failed ); +bool operator<( failed, failed ); +bool operator<=( failed, failed ); + +#if defined(__EDG_VERSION__) +template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; +#   define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y> +#else +template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >  +struct assert_relation {}; +#   define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r> +#endif + +#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +cutl_details_boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +cutl_details_boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +cutl_details_boost::mpl::aux::weighted_tag<3>::type operator>(  assert_, assert_ ); +cutl_details_boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +cutl_details_boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +cutl_details_boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + +#endif  + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1700) + +template<class Pred> +struct extract_assert_pred; + +template<class Pred> +struct extract_assert_pred<void(Pred)> { typedef Pred type; }; + +template<class Pred> +struct eval_assert { +    typedef typename extract_assert_pred<Pred>::type P; +    typedef typename P::type p_type; +    typedef typename ::cutl_details_boost::mpl::if_c<p_type::value, +        AUX778076_ASSERT_ARG(assert<false>), +        failed ************ P::************ +    >::type type; +}; + +template<class Pred> +struct eval_assert_not { +    typedef typename extract_assert_pred<Pred>::type P; +    typedef typename P::type p_type; +    typedef typename ::cutl_details_boost::mpl::if_c<!p_type::value, +        AUX778076_ASSERT_ARG(assert<false>), +        failed ************ ::cutl_details_boost::mpl::not_<P>::************ +    >::type type; +}; + +template< typename T > +T make_assert_arg(); + +#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl<true> { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ +    typedef typename P::type p_type; +    typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ +    typedef typename P::type p_type; +    BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value ); +    typedef typename assert_arg_pred_impl<p>::type type; +}; + +template< typename Pred > +failed ************ (Pred::************  +      assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ) +    ); + +template< typename Pred > +failed ************ (cutl_details_boost::mpl::not_<Pred>::************  +      assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ) +    ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert<false>) +assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert<false>) +assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ); + + +#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER +         +template< bool c, typename Pred > struct assert_arg_type_impl +{ +    typedef failed      ************ Pred::* mwcw83_wknd; +    typedef mwcw83_wknd ************* type; +}; + +template< typename Pred > struct assert_arg_type_impl<true,Pred> +{ +    typedef AUX778076_ASSERT_ARG(assert<false>) type; +}; + +template< typename Pred > struct assert_arg_type +    : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > +{ +}; + +template< typename Pred > +typename assert_arg_type<Pred>::type  +assert_arg(void (*)(Pred), int); + +template< typename Pred > +typename assert_arg_type< cutl_details_boost::mpl::not_<Pred> >::type  +assert_not_arg(void (*)(Pred), int); + +#   if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) +template< long x, long y, bool (*r)(failed, failed) > +typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type +assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); +#   else +template< assert_::relations r, long x, long y > +typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type +assert_rel_arg( assert_relation<r,x,y> ); +#   endif + +#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +#undef AUX778076_ASSERT_ARG + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +// BOOST_MPL_ASSERT((pred<x,...>)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          cutl_details_boost::mpl::assertion_failed<false>( \ +              cutl_details_boost::mpl::make_assert_arg< \ +                  typename cutl_details_boost::mpl::eval_assert<void pred>::type \ +                >() \ +            ) \ +        ) \ +    ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred<x,...>)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          cutl_details_boost::mpl::assertion_failed<false>( \ +              cutl_details_boost::mpl::make_assert_arg< \ +                  typename cutl_details_boost::mpl::eval_assert_not<void pred>::type \ +                >() \ +            ) \ +        ) \ +    ) \ +/**/ + +#else + +// BOOST_MPL_ASSERT((pred<x,...>)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          cutl_details_boost::mpl::assertion_failed<false>( \ +              cutl_details_boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ +            ) \ +        ) \ +    ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred<x,...>)) + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#   define BOOST_MPL_ASSERT_NOT(pred) \ +enum { \ +      BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          cutl_details_boost::mpl::assertion<false>::failed( \ +              cutl_details_boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ +            ) \ +        ) \ +}\ +/**/ +#else +#   define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          cutl_details_boost::mpl::assertion_failed<false>( \ +              cutl_details_boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ +            ) \ +        ) \ +   ) \ +/**/ +#endif + +#endif + +// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) + +#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +#   if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 +#   define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y)      \ +enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ +        cutl_details_boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \ +            (cutl_details_boost::mpl::failed ************ ( cutl_details_boost::mpl::assert_relation< \ +                  cutl_details_boost::mpl::assert_::relations( sizeof( \ +                      cutl_details_boost::mpl::assert_::arg rel cutl_details_boost::mpl::assert_::arg \ +                    ) ) \ +                , x \ +                , y \ +                >::************)) 0 ) \ +        ) \ +    ) \ +/**/ +#   else +#   define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y)    \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ +          cutl_details_boost::mpl::assert_::arg rel cutl_details_boost::mpl::assert_::arg \ +        ) \ +    ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ +        cutl_details_boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \ +              cutl_details_boost::mpl::assert_rel_arg( cutl_details_boost::mpl::assert_relation< \ +                  cutl_details_boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ +                , x \ +                , y \ +                >() ) \ +            ) \ +        ) \ +    ) \ +/**/ +#   endif + +#   define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ +/**/ + +#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +#   if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +#   define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +        cutl_details_boost::mpl::assertion_failed<(x rel y)>( cutl_details_boost::mpl::assert_rel_arg( \ +              cutl_details_boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&cutl_details_boost::mpl::operator rel))() \ +            ) ) \ +        ) \ +    ) \ +/**/ +#   else +#   define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +        cutl_details_boost::mpl::assertion_failed<(x rel y)>( (cutl_details_boost::mpl::failed ************ ( \ +            cutl_details_boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&cutl_details_boost::mpl::operator rel))::************))0 ) \ +        ) \ +    ) \ +/**/ +#   endif + +#endif + + +// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )  + +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) +#   define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : cutl_details_boost::mpl::assert_ \ +{ \ +    using cutl_details_boost::mpl::assert_::types; \ +    static cutl_details_boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ +    { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ +        cutl_details_boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ +        ) \ +    ) \ +/**/ +#else +#   define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ )  \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : cutl_details_boost::mpl::assert_ \ +{ \ +    static cutl_details_boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ +    { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ +        cutl_details_boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ +        ) \ +    ) \ +/**/ +#endif + +#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ +BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ +/**/ + +#endif // BOOST_MPL_ASSERT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/adl_barrier.hpp b/libcutl/cutl/details/boost/mpl/aux_/adl_barrier.hpp new file mode 100644 index 0000000..6c1cf97 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/adl_barrier.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED +#define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: adl_barrier.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/adl.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) + +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } +#   define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ +    namespace cutl_details_boost { namespace mpl { \ +    using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ +    } } \ +/**/ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} } +namespace cutl_details_boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE;  +namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; } +}} +#endif + +#else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE cutl_details_boost::mpl +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace cutl_details_boost { namespace mpl { +#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} +#   define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/arg_typedef.hpp b/libcutl/cutl/details/boost/mpl/aux_/arg_typedef.hpp new file mode 100644 index 0000000..67bf503 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/arg_typedef.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED +#define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arg_typedef.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ +    || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +     +#   define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; + +#else + +#   define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/arity.hpp b/libcutl/cutl/details/boost/mpl/aux_/arity.hpp new file mode 100644 index 0000000..dc25642 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/arity.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#   include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { + +// agurt, 15/mar/02: it's possible to implement the template so that it will  +// "just work" and do not require any specialization, but not on the compilers +// that require the arity workaround in the first place +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct arity +{ +    BOOST_STATIC_CONSTANT(int, value = N); +}; + +}}} + +#endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/arity_spec.hpp b/libcutl/cutl/details/boost/mpl/aux_/arity_spec.hpp new file mode 100644 index 0000000..11cfa09 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/arity_spec.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/int.hpp> +#include <cutl/details/boost/mpl/limits/arity.hpp> +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#include <cutl/details/boost/mpl/aux_/arity.hpp> +#include <cutl/details/boost/mpl/aux_/template_arity_fwd.hpp> +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ +struct arity< \ +      name< BOOST_MPL_PP_PARAMS(i,T) > \ +    , N \ +    > \ +{ \ +    BOOST_STATIC_CONSTANT(int \ +        , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        ); \ +}; \ +} \ +/**/ +#else +#   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/ +#endif + +#   define BOOST_MPL_AUX_ARITY_SPEC(i,name) \ +    BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \ +/**/ + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ +    && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +#   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct template_arity< name<BOOST_MPL_PP_PARAMS(i,T)> > \ +    : int_<i> \ +{ \ +}; \ +} \ +/**/ +#else +#   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ +#endif + + +#endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/common_name_wknd.hpp b/libcutl/cutl/details/boost/mpl/aux_/common_name_wknd.hpp new file mode 100644 index 0000000..0ab5c6b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/common_name_wknd.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: common_name_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x561) +// agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class  +// and function named 'xxx'" diagnostic +#   define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +namespace name_##wknd { \ +template< typename > void name(); \ +} \ +/**/ + +#else + +#   define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/ + +#endif // __BORLANDC__ + +#endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/adl.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/adl.hpp new file mode 100644 index 0000000..f98f4ab --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/adl.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: adl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/intel.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, +// but putting everything expect public, user-specializable metafunctions into +// a separate global namespace has a nice side effect of reducing the length  +// of template instantiation symbols, so we apply the workaround on all  +// platforms that can handle it + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ +    && (   BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ +        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +        || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ +        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ +        || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ +        ) + +#   define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/arrays.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/arrays.hpp new file mode 100644 index 0000000..de8ac9d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/arrays.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arrays.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if    !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +        || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +        ) + +#   define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/bind.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/bind.hpp new file mode 100644 index 0000000..3d87da7 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/bind.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED + +// Copyright David Abrahams 2002 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if    !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && (   BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +        ) + +#   define BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif + +//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/compiler.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/compiler.hpp new file mode 100644 index 0000000..901009a --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/compiler.hpp @@ -0,0 +1,66 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2008 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: compiler.hpp 53189 2009-05-22 20:07:55Z hkaiser $ +// $Date: 2009-05-22 13:07:55 -0700 (Fri, 22 May 2009) $ +// $Revision: 53189 $ + +#if !defined(BOOST_MPL_CFG_COMPILER_DIR) + +#   include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#       define BOOST_MPL_CFG_COMPILER_DIR msvc60 + +#   elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +#       define BOOST_MPL_CFG_COMPILER_DIR msvc70 + +#   elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) +#       define BOOST_MPL_CFG_COMPILER_DIR gcc + +#   elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +#       if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#           define BOOST_MPL_CFG_COMPILER_DIR bcc551 +#       elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590) +#           define BOOST_MPL_CFG_COMPILER_DIR bcc +#       else +#           define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590 +#       endif + +#   elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#       define BOOST_MPL_CFG_COMPILER_DIR dmc + +#   elif defined(__MWERKS__) +#       if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#           define BOOST_MPL_CFG_COMPILER_DIR mwcw +#       else +#           define BOOST_MPL_CFG_COMPILER_DIR plain +#       endif + +#   elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#       define BOOST_MPL_CFG_COMPILER_DIR no_ctps + +#   elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +#       define BOOST_MPL_CFG_COMPILER_DIR no_ttp + +#   else +#       define BOOST_MPL_CFG_COMPILER_DIR plain +#   endif + +#endif // BOOST_MPL_CFG_COMPILER_DIR + +#endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/ctps.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/ctps.hpp new file mode 100644 index 0000000..e188658 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/ctps.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> +#include <cutl/details/boost/config.hpp> + +#if    !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(__BORLANDC__, < 0x582) + +#   define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC + +#endif + +// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in <cutl/details/boost/config.hpp> + +#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp new file mode 100644 index 0000000..bb89e03 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: dmc_ambiguous_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if    !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +#   define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/dtp.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/dtp.hpp new file mode 100644 index 0000000..8a9d3c0 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/dtp.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: dtp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +// MWCW 7.x-8.0 "losts" default template parameters of nested class  +// templates when their owner classes are passed as arguments to other  +// templates; Borland 5.5.1 "forgets" them from the very beginning (if  +// the owner class is a class template), and Borland 5.6 isn't even +// able to compile a definition of nested class template with DTP + +#if    !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ +    && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +#   define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + + +#if    !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && (   BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ +        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +        || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ +        ) +         +#   define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/eti.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/eti.hpp new file mode 100644 index 0000000..f53162e --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/eti.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: eti.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +// flags for MSVC 6.5's so-called "early template instantiation bug" +#if    !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +#   define BOOST_MPL_CFG_MSVC_60_ETI_BUG + +#endif + +#if    !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +#   define BOOST_MPL_CFG_MSVC_70_ETI_BUG + +#endif + +#if    !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ +        || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ +        ) + +#   define BOOST_MPL_CFG_MSVC_ETI_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/gcc.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/gcc.hpp new file mode 100644 index 0000000..b9d8f7d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/gcc.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: gcc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if defined(__GNUC__) && !defined(__EDG_VERSION__) +#   define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) +#else +#   define BOOST_MPL_CFG_GCC 0 +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/has_apply.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/has_apply.hpp new file mode 100644 index 0000000..d7e7db7 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/has_xxx.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \ +    && (   defined(BOOST_MPL_CFG_NO_HAS_XXX) \ +        || BOOST_WORKAROUND(__EDG_VERSION__, < 300) \ +        || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ +        ) + +#   define BOOST_MPL_CFG_NO_HAS_APPLY + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/has_xxx.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/has_xxx.hpp new file mode 100644 index 0000000..ff86e7f --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/has_xxx.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2002-2003 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $ +// $Date: 2010-07-02 01:32:03 -0700 (Fri, 02 Jul 2010) $ +// $Revision: 63518 $ + +#include <cutl/details/boost/mpl/aux_/config/overload_resolution.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +// agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ +    && (   defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ +        || BOOST_WORKAROUND(__GNUC__, <= 2) \ +        || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ +        ) + +#   define BOOST_MPL_CFG_NO_HAS_XXX +#   define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/integral.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/integral.hpp new file mode 100644 index 0000000..22e1be0 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/integral.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: integral.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if    !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +#   define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +#endif + +#if    !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +        || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ +        ) + +#   define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/intel.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/intel.hpp new file mode 100644 index 0000000..97b7309 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/intel.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: intel.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + + +// BOOST_INTEL_CXX_VERSION is defined here: +#include <cutl/details/boost/config.hpp> + +#endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/lambda.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/lambda.hpp new file mode 100644 index 0000000..f9cf5c9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/lambda.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> + +// agurt, 15/jan/02: full-fledged implementation requires both  +// template template parameters _and_ partial specialization + +#if    !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ +    && (   defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ +        || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ +        ) + +#   define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/msvc.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/msvc.hpp new file mode 100644 index 0000000..99c26ef --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/msvc.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: msvc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + + +// BOOST_MSVC is defined here: +#include <cutl/details/boost/config.hpp> + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/msvc_typename.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/msvc_typename.hpp new file mode 100644 index 0000000..be8141d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/msvc_typename.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: msvc_typename.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#   define BOOST_MSVC_TYPENAME +#else +#   define BOOST_MSVC_TYPENAME typename +#endif + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/nttp.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/nttp.hpp new file mode 100644 index 0000000..8b3570d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/nttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" +// for a workaround): +// +//    namespace std { +//    template< typename Char > struct string; +//    } +// +//    void foo(std::string<char>); +// +//    namespace cutl_details_boost { namespace mpl { +//    template< int > struct arg; +//    }} + +#if    !defined(BOOST_MPL_CFG_NTTP_BUG) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +#   define BOOST_MPL_CFG_NTTP_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/overload_resolution.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/overload_resolution.hpp new file mode 100644 index 0000000..a58dd56 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/overload_resolution.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: overload_resolution.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if    !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && (   BOOST_WORKAROUND(__BORLANDC__, < 0x590) \ +        || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ +        ) + +#   define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/pp_counter.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/pp_counter.hpp new file mode 100644 index 0000000..e66e2d3 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/pp_counter.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: pp_counter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_AUX_PP_COUNTER) +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) +#       define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__ +#   else +#       define BOOST_MPL_AUX_PP_COUNTER() __LINE__ +#   endif +#endif + +#endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/preprocessor.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/preprocessor.hpp new file mode 100644 index 0000000..81338d3 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/preprocessor.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: preprocessor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ +    && (   BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ +        || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ +        || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ +        ) + +#   define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION + +#endif + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) +#   define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ +    && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#   define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING +#endif + + +#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/static_constant.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/static_constant.hpp new file mode 100644 index 0000000..a0b2426 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/static_constant.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: static_constant.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +// BOOST_STATIC_CONSTANT is defined here: +#   include <cutl/details/boost/config.hpp> +#else +// undef the macro for the preprocessing mode +#   undef BOOST_STATIC_CONSTANT +#endif + +#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/ttp.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/ttp.hpp new file mode 100644 index 0000000..034296e --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/ttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: ttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ +    && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \ +      || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \ +       ) + +#   define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS + +#endif + + +#if    !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) \ +    && (   BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ +        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ +        ) + +#   define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp new file mode 100644 index 0000000..4494366 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: use_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/config/workaround.hpp b/libcutl/cutl/details/boost/mpl/aux_/config/workaround.hpp new file mode 100644 index 0000000..7699a8a --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/config/workaround.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: workaround.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/detail/workaround.hpp> + +#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/count_args.hpp b/libcutl/cutl/details/boost/mpl/aux_/count_args.hpp new file mode 100644 index 0000000..036a444 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/count_args.hpp @@ -0,0 +1,105 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: count_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/preprocessor/expr_if.hpp> +#include <cutl/details/boost/preprocessor/inc.hpp> +#include <cutl/details/boost/preprocessor/cat.hpp> + +#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) +#   define AUX778076_COUNT_ARGS_PARAM_NAME T +#endif + +#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) +#   define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME +#endif + +// local macros, #undef-ined at the end of the header + +#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) + +#   include <cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> + +#   define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT +#   define AUX778076_COUNT_ARGS_PARAMS(param) \ +    BOOST_MPL_PP_PARAMS( \ +          AUX778076_COUNT_ARGS_ARITY \ +        , param \ +        ) \ +    /**/ + +#else + +#   include <cutl/details/boost/preprocessor/enum_shifted_params.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> + +#   define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT +#   define AUX778076_COUNT_ARGS_PARAMS(param) \ +    BOOST_PP_ENUM_SHIFTED_PARAMS( \ +          BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ +        , param \ +        ) \ +    /**/ + +#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES + + +#define AUX778076_IS_ARG_TEMPLATE_NAME \ +    BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ +/**/ + +#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ +    BOOST_PP_EXPR_IF(i, +) \ +    AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \ +/**/ + +// is_<xxx>_arg +template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > +struct AUX778076_IS_ARG_TEMPLATE_NAME +{ +    BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT> +{ +    BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// <xxx>_count_args +template< +      AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) +    > +struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) +{ +    BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( +          AUX778076_COUNT_ARGS_ARITY +        , AUX778076_COUNT_ARGS_FUNC +        , AUX778076_COUNT_ARGS_PARAM_NAME +        )); +}; + +#undef AUX778076_COUNT_ARGS_FUNC +#undef AUX778076_IS_ARG_TEMPLATE_NAME +#undef AUX778076_COUNT_ARGS_PARAMS +#undef AUX778076_COUNT_ARGS_REPEAT + +#undef AUX778076_COUNT_ARGS_ARITY +#undef AUX778076_COUNT_ARGS_DEFAULT +#undef AUX778076_COUNT_ARGS_PREFIX +#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM +#undef AUX778076_COUNT_ARGS_PARAM_NAME diff --git a/libcutl/cutl/details/boost/mpl/aux_/full_lambda.hpp b/libcutl/cutl/details/boost/mpl/aux_/full_lambda.hpp new file mode 100644 index 0000000..815768c --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/full_lambda.hpp @@ -0,0 +1,354 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: full_lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/lambda_fwd.hpp> +#   include <cutl/details/boost/mpl/bind_fwd.hpp> +#   include <cutl/details/boost/mpl/protect.hpp> +#   include <cutl/details/boost/mpl/quote.hpp> +#   include <cutl/details/boost/mpl/arg.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/int_fwd.hpp> +#   include <cutl/details/boost/mpl/aux_/template_arity.hpp> +#   include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#   if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +#       include <cutl/details/boost/mpl/if.hpp> +#   endif +#endif + +#include <cutl/details/boost/mpl/aux_/lambda_arity_param.hpp> +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> + +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +namespace cutl_details_boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +#   define AUX778076_LAMBDA_PARAMS(i_, param) \ +    BOOST_MPL_PP_PARAMS(i_, param) \ +    /**/ + +#   define AUX778076_BIND_PARAMS(param) \ +    BOOST_MPL_PP_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        ) \ +    /**/ + +#   define AUX778076_BIND_N_PARAMS(i_, param) \ +    BOOST_PP_COMMA_IF(i_) \ +    BOOST_MPL_PP_PARAMS(i_, param) \ +    /**/ + +#   define AUX778076_ARITY_PARAM(param) \ +    BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ +    /**/ + + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +namespace aux { + +template< +      BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) +    > +struct lambda_or +    : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > +    : false_ +{ +}; + +} // namespace aux +#undef n_ + +template< +      typename T +    , typename Tag +    AUX778076_ARITY_PARAM(typename Arity) +    > +struct lambda +{ +    typedef false_ is_le; +    typedef T result_; +    typedef T type; +}; + +template< +      typename T +    > +struct is_lambda_expression +    : lambda<T>::is_le +{ +}; + + +template< int N, typename Tag > +struct lambda< arg<N>,Tag AUX778076_ARITY_PARAM(int_<-1>) > +{ +    typedef true_ is_le; +    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 +    typedef mpl::protect<result_> type;  +}; + + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/aux_/full_lambda.hpp>)) +#include BOOST_PP_ITERATE() + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect<T>,Tag AUX778076_ARITY_PARAM(int_<1>) > +{ +    typedef false_ is_le; +    typedef mpl::protect<T> result_; +    typedef result_ type; +}; + +/// specializations for the main 'bind' form +template< +      typename F, AUX778076_BIND_PARAMS(typename T) +    , typename Tag +    > +struct lambda< +          bind<F,AUX778076_BIND_PARAMS(T)> +        , Tag +        AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)>) +        > +{ +    typedef false_ is_le; +    typedef bind<F, AUX778076_BIND_PARAMS(T)> result_; +    typedef result_ type; +}; + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +template< +      typename F +    , typename Tag1 +    , typename Tag2 +    , typename Arity +    > +struct lambda< +          lambda<F,Tag1,Arity> +        , Tag2 +        , int_<3> +        > +{ +    typedef lambda< F,Tag2 > l1; +    typedef lambda< Tag1,Tag2 > l2; + +    typedef typename l1::is_le is_le; +    typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; +    typedef lambda< typename if_<is_le,arity_,Arity>::type,Tag2 > l3; +     +    typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; +    typedef typename le_result_::result_ result_; +    typedef typename le_result_::type type; +}; + +#elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars +template< +      typename F, typename Tag1, typename Tag2 +    > +struct lambda< +          lambda< F,Tag1 > +        , Tag2 +        > +{ +    typedef lambda< F,Tag2 > l1; +    typedef lambda< Tag1,Tag2 > l2; +     +    typedef typename l1::is_le is_le; +    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; +    typedef typename le_result_::result_ result_; +    typedef typename le_result_::type type; +}; + +#endif + +#   undef AUX778076_ARITY_PARAM +#   undef AUX778076_BIND_N_PARAMS +#   undef AUX778076_BIND_PARAMS +#   undef AUX778076_LAMBDA_PARAMS + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +BOOST_MPL_AUX_NA_SPEC(2, lambda) +#else +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) +#endif + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +namespace aux { + +#   define AUX778076_RESULT(unused, i_, T) \ +    BOOST_PP_COMMA_IF(i_) \ +    typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ +    /**/ + +#   define AUX778076_TYPE(unused, i_, T) \ +    BOOST_PP_COMMA_IF(i_) \ +    typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ +    /**/ + +template< +      typename IsLE, typename Tag +    , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F +    , AUX778076_LAMBDA_PARAMS(i_, typename L) +    > +struct BOOST_PP_CAT(le_result,i_) +{ +    typedef F< +          BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) +        > result_; +     +    typedef result_ type; +}; + +template< +      typename Tag +    , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F +    , AUX778076_LAMBDA_PARAMS(i_, typename L) +    > +struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > +{ +    typedef BOOST_PP_CAT(bind,i_)< +          BOOST_PP_CAT(quote,i_)<F,Tag> +        , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) +        > result_; + +    typedef mpl::protect<result_> type; +}; + +#   undef AUX778076_TYPE +#   undef AUX778076_RESULT + +} // namespace aux + + +#   define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ +    typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ +        BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ +/**/ + +#   define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ +    typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ +        BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ +/**/ + +#   define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ +    BOOST_PP_COMMA_IF(i_) \ +    BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ +/**/ + +template< +      template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F +    , AUX778076_LAMBDA_PARAMS(i_, typename T) +    , typename Tag +    > +struct lambda<  +          F<AUX778076_LAMBDA_PARAMS(i_, T)> +        , Tag +        AUX778076_ARITY_PARAM(int_<i_>) +        > +{ +    BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) +    BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + +    typedef typename aux::lambda_or< +          BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) +        >::type is_le; + +    typedef aux::BOOST_PP_CAT(le_result,i_)< +          is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) +        > le_result_; +     +    typedef typename le_result_::result_ result_; +    typedef typename le_result_::type type; +}; + + +#   undef AUX778076_IS_LAMBDA_EXPR +#   undef AUX778076_IS_LE_TYPEDEF +#   undef AUX778076_LAMBDA_TYPEDEF + +#endif // i_ > 0 + +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) +    , typename Tag +    > +struct lambda< +          BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_, T)> +        , Tag +        AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(i_)>) +        > +{ +    typedef false_ is_le; +    typedef BOOST_PP_CAT(bind,i_)< +          F +        AUX778076_BIND_N_PARAMS(i_, T) +        > result_; +         +    typedef result_ type; +}; + +#undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/aux_/has_apply.hpp b/libcutl/cutl/details/boost/mpl/aux_/has_apply.hpp new file mode 100644 index 0000000..80c4b48 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/has_xxx.hpp> +#include <cutl/details/boost/mpl/aux_/config/has_apply.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) +#else +template< typename T, typename fallback_ = false_ > +struct has_apply +    : fallback_ +{ +}; +#endif +}}} + +#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/has_rebind.hpp b/libcutl/cutl/details/boost/mpl/aux_/has_rebind.hpp new file mode 100644 index 0000000..910b671 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/has_rebind.hpp @@ -0,0 +1,99 @@ + +#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/intel.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +#   include <cutl/details/boost/mpl/has_xxx.hpp> +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#   include <cutl/details/boost/mpl/has_xxx.hpp> +#   include <cutl/details/boost/mpl/if.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/msvc_is_class.hpp> +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +#   include <cutl/details/boost/mpl/if.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#   include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#   include <cutl/details/boost/type_traits/is_class.hpp> +#else +#   include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#   include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#   include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#endif + +namespace cutl_details_boost { namespace mpl { namespace aux { + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false) + +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) + +template< typename T > +struct has_rebind +    : if_<  +          msvc_is_class<T> +        , has_rebind_impl<T> +        , bool_<false> +        >::type +{ +}; + +#else // the rest + +template< typename T > struct has_rebind_tag {}; +no_tag operator|(has_rebind_tag<int>, void const volatile*); + +#   if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +template< typename T > +struct has_rebind +{ +    static has_rebind_tag<T>* get(); +    BOOST_STATIC_CONSTANT(bool, value =  +          sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag) +        ); +}; +#   else // __BORLANDC__ +template< typename T > +struct has_rebind_impl +{ +    static T* get(); +    BOOST_STATIC_CONSTANT(bool, value =  +          sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag) +        ); +}; + +template< typename T > +struct has_rebind +    : if_<  +          is_class<T> +        , has_rebind_impl<T> +        , bool_<false> +        >::type +{ +}; +#   endif // __BORLANDC__ + +#endif + +}}} + +#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/has_type.hpp b/libcutl/cutl/details/boost/mpl/aux_/has_type.hpp new file mode 100644 index 0000000..ac9071f --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/has_type.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/has_xxx.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) +}}} + +#endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/include_preprocessed.hpp b/libcutl/cutl/details/boost/mpl/aux_/include_preprocessed.hpp new file mode 100644 index 0000000..8d01268 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/include_preprocessed.hpp @@ -0,0 +1,42 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/compiler.hpp> +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> +#include <cutl/details/boost/preprocessor/cat.hpp> +#include <cutl/details/boost/preprocessor/stringize.hpp> + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +#   define AUX778076_PREPROCESSED_HEADER \ +    BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +#   define AUX778076_PREPROCESSED_HEADER \ +    BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +#   include AUX778076_INCLUDE_STRING +#   undef AUX778076_INCLUDE_STRING +#else +#   include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +#endif + +#   undef AUX778076_PREPROCESSED_HEADER + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/libcutl/cutl/details/boost/mpl/aux_/integral_wrapper.hpp b/libcutl/cutl/details/boost/mpl/aux_/integral_wrapper.hpp new file mode 100644 index 0000000..7c8b596 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/integral_wrapper.hpp @@ -0,0 +1,93 @@ + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: integral_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include <cutl/details/boost/mpl/integral_c_tag.hpp> +#include <cutl/details/boost/mpl/aux_/static_cast.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#include <cutl/details/boost/preprocessor/cat.hpp> + +#if !defined(AUX_WRAPPER_NAME) +#   define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) +#endif + +#if !defined(AUX_WRAPPER_PARAMS) +#   define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) +#endif + +#if !defined(AUX_WRAPPER_INST) +#   if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) +#       define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > +#   else  +#       define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > +#   endif +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< AUX_WRAPPER_PARAMS(N) > +struct AUX_WRAPPER_NAME +{ +    BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); +// agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some  +// other compilers (e.g. MSVC) are not particulary happy about it +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) +    typedef struct AUX_WRAPPER_NAME type; +#else +    typedef AUX_WRAPPER_NAME type; +#endif +    typedef AUX_WRAPPER_VALUE_TYPE value_type; +    typedef integral_c_tag tag; + +// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), +// while some other don't like 'value + 1' (Borland), and some don't like +// either +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) + private: +    BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); +    BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); + public: +    typedef AUX_WRAPPER_INST(next_value) next; +    typedef AUX_WRAPPER_INST(prior_value) prior; +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ +    || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ +    || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1))) +    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next; +    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior; +#else +    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; +    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; +#endif + +    // enables uniform function call syntax for families of overloaded  +    // functions that return objects of both arithmetic ('int', 'long', +    // 'double', etc.) and wrapped integral types (for an example, see  +    // "mpl/example/power.cpp") +    operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast<AUX_WRAPPER_VALUE_TYPE>(this->value); }  +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< AUX_WRAPPER_PARAMS(N) > +AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#undef AUX_WRAPPER_NAME +#undef AUX_WRAPPER_PARAMS +#undef AUX_WRAPPER_INST +#undef AUX_WRAPPER_VALUE_TYPE diff --git a/libcutl/cutl/details/boost/mpl/aux_/lambda_arity_param.hpp b/libcutl/cutl/details/boost/mpl/aux_/lambda_arity_param.hpp new file mode 100644 index 0000000..9a58209 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/lambda_arity_param.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda_arity_param.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +#   define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param)     +#else +#   define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param +#endif + +#endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/lambda_no_ctps.hpp b/libcutl/cutl/details/boost/mpl/aux_/lambda_no_ctps.hpp new file mode 100644 index 0000000..8805705 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/lambda_no_ctps.hpp @@ -0,0 +1,193 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda_no_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/lambda_fwd.hpp> +#   include <cutl/details/boost/mpl/bind_fwd.hpp> +#   include <cutl/details/boost/mpl/protect.hpp> +#   include <cutl/details/boost/mpl/is_placeholder.hpp> +#   include <cutl/details/boost/mpl/if.hpp> +#   include <cutl/details/boost/mpl/identity.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#   include <cutl/details/boost/mpl/aux_/template_arity.hpp> +#   include <cutl/details/boost/mpl/aux_/value_wknd.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if    !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +namespace cutl_details_boost { namespace mpl { + +#   define AUX778076_LAMBDA_PARAMS(i_, param) \ +    BOOST_MPL_PP_PARAMS(i_, param) \ +    /**/ + +namespace aux { + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +template< +      BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) +    > +struct lambda_or +    : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > +    : false_ +{ +}; +#undef n_ + +template< typename Arity > struct lambda_impl +{ +    template< typename T, typename Tag, typename Protect > struct result_ +    { +        typedef T type; +        typedef is_placeholder<T> is_le; +    }; +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/aux_/lambda_no_ctps.hpp>)) +#include BOOST_PP_ITERATE() + +} // namespace aux + +template< +      typename T +    , typename Tag +    , typename Protect +    > +struct lambda +{ +    /// Metafunction forwarding confuses MSVC 6.x +    typedef typename aux::template_arity<T>::type arity_; +    typedef typename aux::lambda_impl<arity_> +        ::template result_< T,Tag,Protect > l_; + +    typedef typename l_::type type; +    typedef typename l_::is_le is_le; +     +    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< +      typename T +    > +struct is_lambda_expression +    : lambda<T>::is_le +{ +}; + +#   undef AUX778076_LAMBDA_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +///// iteration, depth == 1 + +#else + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#   define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ +    typedef lambda< \ +          typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ +        , Tag \ +        , false_ \ +        > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ +    /**/ + +#   define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ +    typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ +        BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ +    /**/ + +#   define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ +    BOOST_PP_COMMA_IF(i_) \ +    BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ +    /**/ + +#   define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ +    , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ +    /**/ + +template<> struct lambda_impl< int_<i_> > +{ +    template< typename F, typename Tag, typename Protect > struct result_ +    { +        BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) +        BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + +        typedef aux::lambda_or< +              BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) +            > is_le; + +        typedef BOOST_PP_CAT(bind,i_)< +              typename F::rebind +            BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) +            > bind_; + +        typedef typename if_< +              is_le +            , if_< Protect, mpl::protect<bind_>, bind_ > +            , identity<F> +            >::type type_; +     +        typedef typename type_::type type; +    }; +}; + +#   undef AUX778076_LAMBDA_RESULT +#   undef AUX778076_IS_LAMBDA_EXPR +#   undef AUX778076_IS_LE_TYPEDEF +#   undef AUX778076_LAMBDA_TYPEDEF + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/aux_/lambda_support.hpp b/libcutl/cutl/details/boost/mpl/aux_/lambda_support.hpp new file mode 100644 index 0000000..15de4d9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/lambda_support.hpp @@ -0,0 +1,169 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda_support.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ + +#else + +#   include <cutl/details/boost/mpl/int_fwd.hpp> +#   include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#   include <cutl/details/boost/mpl/aux_/na_fwd.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   include <cutl/details/boost/preprocessor/tuple/to_list.hpp> +#   include <cutl/details/boost/preprocessor/list/for_each_i.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ +    typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ +    /**/ + +// agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++ +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)  + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ +    typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ +    BOOST_PP_LIST_FOR_EACH_I_R( \ +          1 \ +        , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ +        , typedef \ +        , BOOST_PP_TUPLE_TO_LIST(i,params) \ +        ) \ +    struct rebind \ +    { \ +        template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ +            : name< BOOST_MPL_PP_PARAMS(i,U) > \ +        { \ +        }; \ +    }; \ +    /**/ + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +    BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ +    /**/ + +#elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +// agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9 +// (in strict mode), so we have to provide an alternative to the  +// MSVC-optimized implementation + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +    typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ +    BOOST_PP_LIST_FOR_EACH_I_R( \ +          1 \ +        , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ +        , typedef \ +        , BOOST_PP_TUPLE_TO_LIST(i,params) \ +        ) \ +    struct rebind; \ +/**/ + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ +    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \ +{ \ +    template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ +        : name< BOOST_MPL_PP_PARAMS(i,U) > \ +    { \ +    }; \ +/**/ + +#else // __EDG_VERSION__ + +namespace cutl_details_boost { namespace mpl { namespace aux { +template< typename T > struct has_rebind_tag; +}}} + +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +    typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ +    BOOST_PP_LIST_FOR_EACH_I_R( \ +          1 \ +        , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ +        , typedef \ +        , BOOST_PP_TUPLE_TO_LIST(i,params) \ +        ) \ +    friend class BOOST_PP_CAT(name,_rebind); \ +    typedef BOOST_PP_CAT(name,_rebind) rebind; \ +/**/ + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::cutl_details_boost::mpl::aux::yes_tag operator|( \ +      ::cutl_details_boost::mpl::aux::has_rebind_tag<int> \ +    , name<BOOST_MPL_PP_PARAMS(i,T)>* \ +    ); \ +::cutl_details_boost::mpl::aux::no_tag operator|( \ +      ::cutl_details_boost::mpl::aux::has_rebind_tag<int> \ +    , name< BOOST_MPL_PP_ENUM(i,::cutl_details_boost::mpl::na) >* \ +    ); \ +/**/ +#elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::cutl_details_boost::mpl::aux::yes_tag operator|( \ +      ::cutl_details_boost::mpl::aux::has_rebind_tag<int> \ +    , ::cutl_details_boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \ +    ); \ +/**/ +#else +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ +#endif + +#   if !defined(__BORLANDC__) +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ +    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ +    template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ +        : name< BOOST_MPL_PP_PARAMS(i,U) > \ +    { \ +    }; \ +/**/ +#   else +#   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ +    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ +    template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ +    { \ +        typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \ +    }; \ +/**/ +#   endif // __BORLANDC__ + +#endif // __EDG_VERSION__ + +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/logical_op.hpp b/libcutl/cutl/details/boost/mpl/aux_/logical_op.hpp new file mode 100644 index 0000000..5f01b40 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/logical_op.hpp @@ -0,0 +1,165 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/nested_type_wknd.hpp> +#   include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#endif + +#include <cutl/details/boost/mpl/limits/arity.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/ext_params.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/sub.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#include <cutl/details/boost/preprocessor/dec.hpp> +#include <cutl/details/boost/preprocessor/inc.hpp> +#include <cutl/details/boost/preprocessor/cat.hpp> + +namespace cutl_details_boost { namespace mpl { + +#   define AUX778076_PARAMS(param, sub) \ +    BOOST_MPL_PP_PARAMS( \ +          BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ +        , param \ +        ) \ +    /**/ + +#   define AUX778076_SHIFTED_PARAMS(param, sub) \ +    BOOST_MPL_PP_EXT_PARAMS( \ +          2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ +        , param \ +        ) \ +    /**/ + +#   define AUX778076_SPEC_PARAMS(param) \ +    BOOST_MPL_PP_ENUM( \ +          BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ +        , param \ +        ) \ +    /**/ + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< bool C_, AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +    : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) +{ +}; + +template< AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > +    : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< +          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value +        , AUX778076_SHIFTED_PARAMS(T, 1) +        , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +        > +{ +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< +          AUX778076_OP_VALUE2 +        , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) +        > +    : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; + +#else + +template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +{ +    template< AUX778076_PARAMS(typename T, 1) > struct result_ +        : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) +    { +    }; +}; + +template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2> +{ +    template< AUX778076_PARAMS(typename T, 1) > struct result_ +        : BOOST_PP_CAT(AUX778076_OP_NAME,impl)<  +              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value +            >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > +    { +    }; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +    template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))> +        : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +    { +    }; +}; +#else +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2> +    ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > +        : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; +#endif // BOOST_MSVC == 1300 + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T1) +    , typename BOOST_MPL_AUX_NA_PARAM(T2) +    BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) +    > +struct AUX778076_OP_NAME +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +    : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< +          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value +        , AUX778076_SHIFTED_PARAMS(T,0) +        > +#else +    : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<  +          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value +        >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > +#endif +{ +    BOOST_MPL_AUX_LAMBDA_SUPPORT( +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY +        , AUX778076_OP_NAME +        , (AUX778076_PARAMS(T, 0)) +        ) +}; + +BOOST_MPL_AUX_NA_SPEC2( +      2 +    , BOOST_MPL_LIMIT_METAFUNCTION_ARITY +    , AUX778076_OP_NAME +    ) + +}} + +#undef AUX778076_SPEC_PARAMS +#undef AUX778076_SHIFTED_PARAMS +#undef AUX778076_PARAMS +#undef AUX778076_OP_NAME +#undef AUX778076_OP_VALUE1 +#undef AUX778076_OP_VALUE2 diff --git a/libcutl/cutl/details/boost/mpl/aux_/msvc_dtw.hpp b/libcutl/cutl/details/boost/mpl/aux_/msvc_dtw.hpp new file mode 100644 index 0000000..5ce0de5 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/msvc_dtw.hpp @@ -0,0 +1,68 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: msvc_dtw.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> + +// local macros, #undef-ined at the end of the header +#define AUX778076_DTW_PARAMS(param) \ +    BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ +/**/ + +#define AUX778076_DTW_ORIGINAL_NAME \ +    AUX778076_MSVC_DTW_ORIGINAL_NAME \ +/**/ + +// warning: not a well-formed C++ +// workaround for MSVC 6.5's "dependent template typedef bug" + +template< typename F> +struct AUX778076_MSVC_DTW_NAME +{ +    template< bool > struct f_ : F {}; +    template<> struct f_<true> +    { +#if AUX778076_MSVC_DTW_ARITY > 0 +        template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME +        { +            typedef int type; +        }; +    }; + +    template< AUX778076_DTW_PARAMS(typename T) > struct result_ +        : f_< aux::msvc_never_true<F>::value > +            ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > +    { +    }; +#else +        template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME +        { +            typedef int type; +        }; +    }; + +    template< typename T = int > struct result_ +        : f_< aux::msvc_never_true<F>::value > +            ::template AUX778076_DTW_ORIGINAL_NAME<> +    { +    }; +#endif +}; + +#undef AUX778076_DTW_ORIGINAL_NAME +#undef AUX778076_DTW_PARAMS + +#undef AUX778076_MSVC_DTW_NAME +#undef AUX778076_MSVC_DTW_ORIGINAL_NAME +#undef AUX778076_MSVC_DTW_ARITY diff --git a/libcutl/cutl/details/boost/mpl/aux_/msvc_is_class.hpp b/libcutl/cutl/details/boost/mpl/aux_/msvc_is_class.hpp new file mode 100644 index 0000000..17da363 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/msvc_is_class.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: msvc_is_class.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/if.hpp> +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#include <cutl/details/boost/mpl/aux_/yes_no.hpp> + +#include <cutl/details/boost/type_traits/is_reference.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< typename T > struct is_class_helper +{ +    typedef int (T::* type)(); +}; + +// MSVC 6.x-specific lightweight 'is_class' implementation;  +// Distinguishing feature: does not instantiate the type being tested. +template< typename T > +struct msvc_is_class_impl +{ +    template< typename U> +    static yes_tag  test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0); +    static no_tag   test(void const volatile*, ...); + +    enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) }; +    typedef bool_<value> type; +}; + +// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in +// complex metaprograms +template< typename T > +struct msvc_is_class +    : if_< +          is_reference<T> +        , false_ +        , msvc_is_class_impl<T> +        >::type +{ +}; + +}}} + +#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/msvc_never_true.hpp b/libcutl/cutl/details/boost/mpl/aux_/msvc_never_true.hpp new file mode 100644 index 0000000..d623eaf --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/msvc_never_true.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: msvc_never_true.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< typename T > +struct msvc_never_true +{ +    enum { value = false }; +}; + +}}} + +#endif // BOOST_MSVC + +#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/na.hpp b/libcutl/cutl/details/boost/mpl/aux_/na.hpp new file mode 100644 index 0000000..efbd9bc --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/na.hpp @@ -0,0 +1,95 @@ + +#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: na.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/na_fwd.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> + +namespace cutl_details_boost { namespace mpl { + +template< typename T > +struct is_na +    : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using false_::value; +#endif +}; + +template<> +struct is_na<na> +    : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using true_::value; +#endif +}; + +template< typename T > +struct is_not_na +    : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using true_::value; +#endif +}; + +template<> +struct is_not_na<na> +    : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using false_::value; +#endif +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename T, typename U > struct if_na +{ +    typedef T type; +}; + +template< typename U > struct if_na<na,U> +{ +    typedef U type; +}; +#else +template< typename T > struct if_na_impl +{ +    template< typename U > struct apply +    { +        typedef T type; +    }; +}; + +template<> struct if_na_impl<na> +{ +    template< typename U > struct apply +    { +        typedef U type; +    }; +}; + +template< typename T, typename U > struct if_na +    : if_na_impl<T>::template apply<U> +{ +}; +#endif + +}} + +#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/na_assert.hpp b/libcutl/cutl/details/boost/mpl/aux_/na_assert.hpp new file mode 100644 index 0000000..01c4393 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/na_assert.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: na_assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/na.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601)    \ +    && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) +#   include <cutl/details/boost/mpl/assert.hpp> +#   define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ +    BOOST_MPL_ASSERT_NOT((cutl_details_boost::mpl::is_na<type>)) \ +/**/ +#else +#   include <cutl/details/boost/static_assert.hpp> +#   define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ +    BOOST_STATIC_ASSERT(!cutl_details_boost::mpl::is_na<x>::value) \ +/**/ +#endif + +#endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/na_fwd.hpp b/libcutl/cutl/details/boost/mpl/aux_/na_fwd.hpp new file mode 100644 index 0000000..5ffb808 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/na_fwd.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: na_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// n.a. == not available +struct na +{ +    typedef na type; +    enum { value = 0 }; +}; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(na) + +#endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/na_spec.hpp b/libcutl/cutl/details/boost/mpl/aux_/na_spec.hpp new file mode 100644 index 0000000..8279b6d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/na_spec.hpp @@ -0,0 +1,175 @@ + +#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/lambda_fwd.hpp> +#   include <cutl/details/boost/mpl/int.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#   include <cutl/details/boost/mpl/aux_/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/template_arity_fwd.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_arity_param.hpp> +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#include <cutl/details/boost/mpl/aux_/config/eti.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> +#include <cutl/details/boost/mpl/aux_/config/overload_resolution.hpp> + + +#define BOOST_MPL_AUX_NA_PARAMS(i) \ +    BOOST_MPL_PP_ENUM(i, na) \ +/**/ + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#   define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ +struct arity< \ +          name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +        , N \ +        > \ +    : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ +{ \ +}; \ +} \ +/**/ +#else +#   define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +template<> \ +struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +{ \ +    template< \ +          BOOST_MPL_PP_PARAMS(i, typename T) \ +        BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ +        > \ +    struct apply \ +        : name< BOOST_MPL_PP_PARAMS(i, T) > \ +    { \ +    }; \ +}; \ +/**/ + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +#   define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ +      name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +    , void_ \ +    , true_ \ +    > \ +{ \ +    typedef false_ is_le; \ +    typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +template<> \ +struct lambda< \ +      name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +    , void_ \ +    , false_ \ +    > \ +{ \ +    typedef false_ is_le; \ +    typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#else +#   define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template< typename Tag > \ +struct lambda< \ +      name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +    , Tag \ +    BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ +    > \ +{ \ +    typedef false_ is_le; \ +    typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \ +    typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#endif + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ +    || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ +        && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) +#   define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(j, typename T) > \ +struct template_arity< \ +          name< BOOST_MPL_PP_PARAMS(j, T) > \ +        > \ +    : int_<j> \ +{ \ +}; \ +\ +template<> \ +struct template_arity< \ +          name< BOOST_MPL_PP_ENUM(i, na) > \ +        > \ +    : int_<-1> \ +{ \ +}; \ +} \ +/**/ +#else +#   define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ +#endif + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +#   define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +template<> \ +struct name< BOOST_MPL_PP_ENUM(i, int) > \ +{ \ +    typedef int type; \ +    enum { value = 0 }; \ +}; \ +/**/ +#else +#   define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_PARAM(param) param = na + +#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC(i, name) \ +BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +/**/ + + +#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/nested_type_wknd.hpp b/libcutl/cutl/details/boost/mpl/aux_/nested_type_wknd.hpp new file mode 100644 index 0000000..0a8a005 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/nested_type_wknd.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: nested_type_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ +    || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ +    || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ +    || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +namespace cutl_details_boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd +    : T::type +{ +}; +}}} + +#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#   define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ +    aux::nested_type_wknd<T> \ +/**/ +#else +#   define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ +    ::cutl_details_boost::mpl::aux::nested_type_wknd<T> \ +/**/ +#endif + +#else // !BOOST_MPL_CFG_GCC et al. + +#   define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type + +#endif  + +#endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/nttp_decl.hpp b/libcutl/cutl/details/boost/mpl/aux_/nttp_decl.hpp new file mode 100644 index 0000000..5e6a0d7 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/nttp_decl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED +#define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: nttp_decl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/nttp.hpp> + +#if defined(BOOST_MPL_CFG_NTTP_BUG) + +typedef bool        _mpl_nttp_bool; +typedef int         _mpl_nttp_int; +typedef unsigned    _mpl_nttp_unsigned; +typedef long        _mpl_nttp_long; + +#   include <cutl/details/boost/preprocessor/cat.hpp> +#   define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ + +#else + +#   define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ + +#endif + +#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/add.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/add.hpp new file mode 100644 index 0000000..252afba --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/add.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: add.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/mpl/aux_/preprocessor/tuple.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_ADD(i,j) \ +    BOOST_MPL_PP_ADD_DELAY(i,j) \ +    /**/ + +#   define BOOST_MPL_PP_ADD_DELAY(i,j) \ +    BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \ +    /**/ +#else +#   define BOOST_MPL_PP_ADD(i,j) \ +    BOOST_MPL_PP_ADD_DELAY(i,j) \ +    /**/ + +#   define BOOST_MPL_PP_ADD_DELAY(i,j) \ +    BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ +    /**/ +#endif + +#   define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) +#   define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) +#   define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) +#   define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) +#   define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) +#   define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) +#   define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) +#   define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) +#   define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) +#   define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) +#   define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) + +#else + +#   include <cutl/details/boost/preprocessor/arithmetic/add.hpp> + +#   define BOOST_MPL_PP_ADD(i,j) \ +    BOOST_PP_ADD(i,j) \ +    /**/ +     +#endif  + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp new file mode 100644 index 0000000..2d5e0e0 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp @@ -0,0 +1,105 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: def_params_tail.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/limits/arity.hpp> +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +#include <cutl/details/boost/preprocessor/comma_if.hpp> +#include <cutl/details/boost/preprocessor/logical/and.hpp> +#include <cutl/details/boost/preprocessor/identity.hpp> +#include <cutl/details/boost/preprocessor/empty.hpp> + +// BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): <nothing> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/mpl/aux_/preprocessor/filter_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/sub.hpp> + +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ +          i \ +        , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ +        , param \ +        , value_func \ +        ) \ +    /**/ + +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1(i, n, param, value_func) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i,n,param,value_func) \ +    /**/ + +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \ +    BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \ +    /**/ + +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v()) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_4(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_5(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_6(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_7(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6,p7) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_8(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9 v(),p1,p2,p3,p4,p5,p6,p7,p8) +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_9(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p1,p2,p3,p4,p5,p6,p7,p8,p9) + +#else + +#   include <cutl/details/boost/preprocessor/arithmetic/add.hpp> +#   include <cutl/details/boost/preprocessor/arithmetic/sub.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/tuple/elem.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ +    , BOOST_PP_CAT( \ +          BOOST_PP_TUPLE_ELEM(3, 1, op) \ +        , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ +        ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ +    /**/ + +#   define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ +    BOOST_PP_REPEAT( \ +          BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ +        , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ +        , (i, param, value_func) \ +        ) \ +    /**/ + + +#endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES + +#define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ +    /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#   define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ +    /**/ +#else +#   define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ +    BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_EMPTY) \ +    /**/ +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp new file mode 100644 index 0000000..78a0d9e --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: default_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +// BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): <nothing> +// BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ +    BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ +    /**/ +     +#   define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v) +#   define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v +#   define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v + +#else + +#   include <cutl/details/boost/preprocessor/tuple/elem.hpp> +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ +    BOOST_PP_COMMA_IF(i) \ +    BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \ +        = BOOST_PP_TUPLE_ELEM(2,1,pv) \ +    /**/ + +#   define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ +    BOOST_PP_REPEAT( \ +          n \ +        , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ +        , (param,value) \ +        ) \ +    /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/enum.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/enum.hpp new file mode 100644 index 0000000..64d74e0 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/enum.hpp @@ -0,0 +1,62 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: enum.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +// BOOST_MPL_PP_ENUM(0,int): <nothing> +// BOOST_MPL_PP_ENUM(1,int): int +// BOOST_MPL_PP_ENUM(2,int): int, int +// BOOST_MPL_PP_ENUM(n,int): int, int, .., int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_ENUM(n, param) \ +    BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ +    /**/ +     +#   define BOOST_MPL_PP_ENUM_0(p) +#   define BOOST_MPL_PP_ENUM_1(p) p +#   define BOOST_MPL_PP_ENUM_2(p) p,p +#   define BOOST_MPL_PP_ENUM_3(p) p,p,p +#   define BOOST_MPL_PP_ENUM_4(p) p,p,p,p +#   define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p +#   define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p +#   define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p +#   define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p +#   define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p + +#else + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> + +#   define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ +    BOOST_PP_COMMA_IF(i) param \ +    /**/ + +#   define BOOST_MPL_PP_ENUM(n, param) \ +    BOOST_PP_REPEAT( \ +          n \ +        , BOOST_MPL_PP_AUX_ENUM_FUNC \ +        , param \ +        ) \ +    /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/ext_params.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/ext_params.hpp new file mode 100644 index 0000000..31a5da2 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/ext_params.hpp @@ -0,0 +1,78 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: ext_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +// BOOST_MPL_PP_EXT_PARAMS(2,2,T): <nothing> +// BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 +// BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 +// BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/mpl/aux_/preprocessor/filter_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/sub.hpp> + +#   define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ +    BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ +    /**/ + +#   define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \ +    BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ +    /**/ + +#   define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ +    BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \ +    /**/ + +#   define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9) +#   define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1) +#   define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2) +#   define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3) +#   define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4) +#   define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5) +#   define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6) +#   define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7) +#   define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8) + +#else + +#   include <cutl/details/boost/preprocessor/arithmetic/add.hpp> +#   include <cutl/details/boost/preprocessor/arithmetic/sub.hpp> +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> +#   include <cutl/details/boost/preprocessor/tuple/elem.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ +    BOOST_PP_COMMA_IF(i) \ +    BOOST_PP_CAT( \ +          BOOST_PP_TUPLE_ELEM(2,1,op) \ +        , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \ +        ) \ +    /**/ + +#   define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ +    BOOST_PP_REPEAT( \ +          BOOST_PP_SUB_D(1,j,i) \ +        , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ +        , (i,param) \ +        ) \ +    /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/filter_params.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/filter_params.hpp new file mode 100644 index 0000000..fefd984 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/filter_params.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: filter_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9)  +#define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 +#define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 +#define BOOST_MPL_PP_FILTER_PARAMS_3(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3 +#define BOOST_MPL_PP_FILTER_PARAMS_4(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4 +#define BOOST_MPL_PP_FILTER_PARAMS_5(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5 +#define BOOST_MPL_PP_FILTER_PARAMS_6(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6 +#define BOOST_MPL_PP_FILTER_PARAMS_7(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7 +#define BOOST_MPL_PP_FILTER_PARAMS_8(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8 +#define BOOST_MPL_PP_FILTER_PARAMS_9(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8,p9 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/params.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/params.hpp new file mode 100644 index 0000000..d222dc7 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/params.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +// BOOST_MPL_PP_PARAMS(0,T): <nothing> +// BOOST_MPL_PP_PARAMS(1,T): T1 +// BOOST_MPL_PP_PARAMS(2,T): T1, T2 +// BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_PARAMS(n,p) \ +    BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ +    /**/ + +#   define BOOST_MPL_PP_PARAMS_0(p) +#   define BOOST_MPL_PP_PARAMS_1(p) p##1 +#   define BOOST_MPL_PP_PARAMS_2(p) p##1,p##2 +#   define BOOST_MPL_PP_PARAMS_3(p) p##1,p##2,p##3 +#   define BOOST_MPL_PP_PARAMS_4(p) p##1,p##2,p##3,p##4 +#   define BOOST_MPL_PP_PARAMS_5(p) p##1,p##2,p##3,p##4,p##5 +#   define BOOST_MPL_PP_PARAMS_6(p) p##1,p##2,p##3,p##4,p##5,p##6 +#   define BOOST_MPL_PP_PARAMS_7(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7 +#   define BOOST_MPL_PP_PARAMS_8(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8 +#   define BOOST_MPL_PP_PARAMS_9(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9 + +#else + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/repeat.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ +    BOOST_PP_COMMA_IF(i) \ +    BOOST_PP_CAT(param, BOOST_PP_INC(i)) \ +    /**/ + +#   define BOOST_MPL_PP_PARAMS(n, param) \ +    BOOST_PP_REPEAT( \ +          n \ +        , BOOST_MPL_PP_AUX_PARAM_FUNC \ +        , param \ +        ) \ +    /**/ + +#endif  + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/partial_spec_params.hpp new file mode 100644 index 0000000..a45454f --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/partial_spec_params.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: partial_spec_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/limits/arity.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#include <cutl/details/boost/mpl/aux_/preprocessor/sub.hpp> +#include <cutl/details/boost/preprocessor/comma_if.hpp> + +#define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ +BOOST_MPL_PP_PARAMS(n, param) \ +BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ +BOOST_MPL_PP_ENUM( \ +      BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ +    , def \ +    ) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/range.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/range.hpp new file mode 100644 index 0000000..27325e5 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/range.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/preprocessor/seq/subseq.hpp> + +#define BOOST_MPL_PP_RANGE(first, length) \ +    BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp new file mode 100644 index 0000000..98c022b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: repeat.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_REPEAT(n,f,param) \ +    BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ +    /**/ +     +#   define BOOST_MPL_PP_REPEAT_0(f,p) +#   define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p) +#   define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p) +#   define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p) +#   define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) +#   define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) +#   define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) +#   define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) +#   define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) +#   define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) +#   define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) + +#else  + +#   include <cutl/details/boost/preprocessor/repeat.hpp> + +#   define BOOST_MPL_PP_REPEAT(n,f,param) \ +    BOOST_PP_REPEAT(n,f,param) \ +    /**/ + +#endif  + +#define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x + +#endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/sub.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/sub.hpp new file mode 100644 index 0000000..2965017 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/sub.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: sub.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +#   include <cutl/details/boost/mpl/aux_/preprocessor/tuple.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define BOOST_MPL_PP_SUB(i,j) \ +    BOOST_MPL_PP_SUB_DELAY(i,j) \ +    /**/ + +#   define BOOST_MPL_PP_SUB_DELAY(i,j) \ +    BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \ +    /**/ +#else +#   define BOOST_MPL_PP_SUB(i,j) \ +    BOOST_MPL_PP_SUB_DELAY(i,j) \ +    /**/ + +#   define BOOST_MPL_PP_SUB_DELAY(i,j) \ +    BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ +    /**/ +#endif + +#   define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) +#   define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) +#   define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) +#   define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) +#   define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) +#   define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) +#   define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) +#   define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) +#   define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) +#   define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) +#   define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) + +#else + +#   include <cutl/details/boost/preprocessor/arithmetic/sub.hpp> + +#   define BOOST_MPL_PP_SUB(i,j) \ +    BOOST_PP_SUB(i,j) \ +    /**/ +     +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/preprocessor/tuple.hpp b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/tuple.hpp new file mode 100644 index 0000000..ed59407 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/preprocessor/tuple.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: tuple.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 +#define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 +#define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 +#define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3 +#define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4 +#define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5 +#define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6 +#define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7 +#define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8 +#define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9 +#define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/static_cast.hpp b/libcutl/cutl/details/boost/mpl/aux_/static_cast.hpp new file mode 100644 index 0000000..7fd7ed2 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/static_cast.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED +#define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: static_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__GNUC__, < 3) \ + || BOOST_WORKAROUND(__MWERKS__, <= 0x3001) +#   define BOOST_MPL_AUX_STATIC_CAST(T, expr) (T)(expr) +#else +#   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr) +#endif + +#endif // BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/template_arity.hpp b/libcutl/cutl/details/boost/mpl/aux_/template_arity.hpp new file mode 100644 index 0000000..5f697a9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/template_arity.hpp @@ -0,0 +1,189 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $ +// $Date: 2010-04-26 11:48:26 -0700 (Mon, 26 Apr 2010) $ +// $Revision: 61584 $ + +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/aux_/template_arity_fwd.hpp> +#   include <cutl/details/boost/mpl/int.hpp> +#   if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +#   if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +#       include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#   endif +#   else +#       include <cutl/details/boost/mpl/aux_/has_rebind.hpp> +#   endif +#endif + +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +#   if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/range.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +#   include <cutl/details/boost/preprocessor/seq/fold_left.hpp> +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#   define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag +{ +    typedef char (&type)[N + 1]; +}; + +#   define AUX778076_MAX_ARITY_OP(unused, state, i_) \ +    ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ +/**/ + +template< +      BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) +    > +struct max_arity +{ +    BOOST_STATIC_CONSTANT(int, value =  +          BOOST_PP_SEQ_FOLD_LEFT( +              AUX778076_MAX_ARITY_OP +            , -1 +            , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) +            ) +        ); +}; + +#   undef AUX778076_MAX_ARITY_OP + +arity_tag<0>::type arity_helper(...); + +#   define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) +#   define BOOST_PP_FILENAME_1 <cutl/details/boost/mpl/aux_/template_arity.hpp> +#   include BOOST_PP_ITERATE() + +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct template_arity_impl +{ +    BOOST_STATIC_CONSTANT(int, value =  +          sizeof(::cutl_details_boost::mpl::aux::arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1 +        ); +}; + +#   define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ +    BOOST_PP_COMMA_IF(i_) template_arity_impl<F,BOOST_PP_INC(i_)>::value \ +/**/ + +template< typename F > +struct template_arity +{ +    BOOST_STATIC_CONSTANT(int, value = ( +          max_arity< BOOST_MPL_PP_REPEAT( +              AUX778076_ARITY +            , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION +            , F +            ) >::value +        )); +         +    typedef mpl::int_<value> type; +}; + +#   undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + +#   undef AUX778076_ARITY + +}}} + +#   endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +#   else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#   include <cutl/details/boost/mpl/aux_/config/eti.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ +    template< typename F > struct result_ +        : mpl::int_<-1> +    { +    }; +}; + +template<> +struct template_arity_impl<true> +{ +    template< typename F > struct result_ +        : F::arity +    { +    }; +}; + +template< typename F > +struct template_arity +    : template_arity_impl< ::cutl_details_boost::mpl::aux::has_rebind<F>::value > +        ::template result_<F> +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> +struct template_arity<int> +    : mpl::int_<-1> +{ +}; +#endif + +}}} + +#   endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< +      template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F +    , BOOST_MPL_PP_PARAMS(i_, typename T) +    > +typename arity_tag<i_>::type +arity_helper(type_wrapper< F<BOOST_MPL_PP_PARAMS(i_, T)> >, arity_tag<i_>); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/aux_/template_arity_fwd.hpp b/libcutl/cutl/details/boost/mpl/aux_/template_arity_fwd.hpp new file mode 100644 index 0000000..40bb6d4 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/template_arity_fwd.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: template_arity_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< typename F > struct template_arity; + +}}} + +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/type_wrapper.hpp b/libcutl/cutl/details/boost/mpl/aux_/type_wrapper.hpp new file mode 100644 index 0000000..443988b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/type_wrapper.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED +#define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Peter Dimov 2000-2003 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< typename T > struct type_wrapper +{ +    typedef T type; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// agurt 08/may/03: a complicated way to extract the wrapped type; need it  +// mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the  +// nested 'type' from 'type_wrapper<T>' when the latter was the result of a +// 'typeof' expression +template< typename T > struct wrapped_type; + +template< typename T > struct wrapped_type< type_wrapper<T> > +{ +    typedef T type; +}; +#else +template< typename W > struct wrapped_type +{ +    typedef typename W::type type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/value_wknd.hpp b/libcutl/cutl/details/boost/mpl/aux_/value_wknd.hpp new file mode 100644 index 0000000..7454b3b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/value_wknd.hpp @@ -0,0 +1,89 @@ + +#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/static_cast.hpp> +#include <cutl/details/boost/mpl/aux_/config/integral.hpp> +#include <cutl/details/boost/mpl/aux_/config/eti.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ +    || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +#   include <cutl/details/boost/mpl/int.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { +template< typename C_ > struct value_wknd +    : C_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +template<> struct value_wknd<int> +    : int_<1> +{ +    using int_<1>::value; +}; +#endif +}}} + + +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +#   define BOOST_MPL_AUX_VALUE_WKND(C) \ +    ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ +/**/ +#    define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) +#else +#   define BOOST_MPL_AUX_VALUE_WKND(C) C +#   define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ +    ::cutl_details_boost::mpl::aux::value_wknd< C > \ +/**/ +#endif + +#else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +#   define BOOST_MPL_AUX_VALUE_WKND(C) C +#   define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C + +#endif + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) +#   define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ +    BOOST_MPL_AUX_STATIC_CAST(T, C::value) \ +/**/ +#else +#   define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ +    BOOST_MPL_AUX_VALUE_WKND(C)::value \ +/**/ +#endif + + +namespace cutl_details_boost { namespace mpl { namespace aux { + +template< typename T > struct value_type_wknd +{ +    typedef typename T::value_type type; +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> struct value_type_wknd<int> +{ +    typedef int type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/aux_/yes_no.hpp b/libcutl/cutl/details/boost/mpl/aux_/yes_no.hpp new file mode 100644 index 0000000..4ea9acc --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/aux_/yes_no.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED +#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: yes_no.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/config/arrays.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + + +namespace cutl_details_boost { namespace mpl { namespace aux { + +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; + +template< bool C_ > struct yes_no_tag +{ +    typedef no_tag type; +}; + +template<> struct yes_no_tag<true> +{ +    typedef yes_tag type; +}; + + +template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag +{ +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    typedef char (&type)[n]; +#else +    char buf[n]; +    typedef weighted_tag type; +#endif +}; + +#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) +template<> struct weighted_tag<0> +{ +    typedef char (&type)[1]; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/bind.hpp b/libcutl/cutl/details/boost/mpl/bind.hpp new file mode 100644 index 0000000..4ddf5e8 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/bind.hpp @@ -0,0 +1,551 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_HPP_INCLUDED +#define BOOST_MPL_BIND_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/bind_fwd.hpp> +#   include <cutl/details/boost/mpl/placeholders.hpp> +#   include <cutl/details/boost/mpl/next.hpp> +#   include <cutl/details/boost/mpl/protect.hpp> +#   include <cutl/details/boost/mpl/apply_wrap.hpp> +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#   include <cutl/details/boost/mpl/aux_/arity_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#   include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#       include <cutl/details/boost/type_traits/is_reference.hpp> +#   endif  +#endif + +#include <cutl/details/boost/mpl/aux_/config/bind.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +#       define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp +#   else +#       define BOOST_MPL_PREPROCESSED_HEADER bind.hpp +#   endif +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/partial_spec_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/ext_params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/repeat.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/enum.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/add.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ttp.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> +#   include <cutl/details/boost/preprocessor/inc.hpp> + +namespace cutl_details_boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +#   define AUX778076_APPLY \ +    BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ +    /**/ + +#   if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +#       define AUX778076_DMC_PARAM() , int dummy_ +#   else +#       define AUX778076_DMC_PARAM() +#   endif + +#   define AUX778076_BIND_PARAMS(param) \ +    BOOST_MPL_PP_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        ) \ +    /**/ + +#   define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ +    BOOST_MPL_PP_DEFAULT_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        , value \ +        ) \ +    /**/ + +#   define AUX778076_BIND_N_PARAMS(n, param) \ +    BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ +    /**/ + +#   define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ +    BOOST_PP_COMMA_IF(n) \ +    BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ +    /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +#   define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ +    AUX778076_BIND_DEFAULT_PARAMS(param, value) \ +    /**/ +#else +#   define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ +    AUX778076_BIND_PARAMS(param) \ +    /**/ +#endif + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< +      typename T, AUX778076_BIND_PARAMS(typename U) +    > +struct resolve_bind_arg +{ +    typedef T type; +}; + +#   if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< +      typename T +    , typename Arg +    > +struct replace_unnamed_arg +{ +    typedef Arg next; +    typedef T type; +}; + +template< +      typename Arg +    > +struct replace_unnamed_arg< arg<-1>,Arg > +{ +    typedef typename Arg::next next; +    typedef Arg type; +}; + +#   endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +template< +      BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) +    > +struct resolve_bind_arg< arg<N>,AUX778076_BIND_PARAMS(U) > +{ +    typedef typename AUX778076_APPLY<mpl::arg<N>, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< +      typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) +    > +struct resolve_bind_arg< bind<F,AUX778076_BIND_PARAMS(T)>,AUX778076_BIND_PARAMS(U) > +{ +    typedef bind<F,AUX778076_BIND_PARAMS(T)> f_; +    typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type; +}; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// agurt, 15/jan/02: it's not a intended to be used as a function class, and  +// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't +// work), so I went with the 'result_' here, and in all other similar cases +template< bool > +struct resolve_arg_impl +{ +    template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ +    { +        typedef T type; +    }; +}; + +template<>  +struct resolve_arg_impl<true> +{ +    template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ +    { +        typedef typename AUX778076_APPLY< +              T +            , AUX778076_BIND_PARAMS(U) +            >::type type; +    }; +}; + +// for 'resolve_bind_arg' +template< typename T > struct is_bind_template; + +template<  +      typename T, AUX778076_BIND_PARAMS(typename U) +    > +struct resolve_bind_arg +    : resolve_arg_impl< is_bind_template<T>::value > +            ::template result_< T,AUX778076_BIND_PARAMS(U) > +{ +}; + +#   if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< typename T >  +struct replace_unnamed_arg_impl +{ +    template< typename Arg > struct result_ +    { +        typedef Arg next; +        typedef T type; +    }; +}; + +template<>  +struct replace_unnamed_arg_impl< arg<-1> > +{ +    template< typename Arg > struct result_ +    { +        typedef typename next<Arg>::type next; +        typedef Arg type; +    }; +}; + +template< typename T, typename Arg >  +struct replace_unnamed_arg +    : replace_unnamed_arg_impl<T>::template result_<Arg> +{ +}; + +#   endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +// agurt, 10/mar/02: the forward declaration has to appear before any of +// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect<T>*); + +// overload for "main" form +// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload  +// in case if we use 'aux::type_wrapper< bind<...> >' here, and all  +// 'bind' instantiations form a complete type anyway +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< +      typename F, AUX778076_BIND_PARAMS(typename T) +    > +aux::yes_tag is_bind_helper(bind<F,AUX778076_BIND_PARAMS(T)>*); +#endif + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_bind_helper(arg<N>*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ +    template< typename T > struct result_ +    { +        BOOST_STATIC_CONSTANT(bool, value = false); +    }; +}; + +template<> +struct is_bind_template_impl<false> +{ +    template< typename T > struct result_ +    { +        BOOST_STATIC_CONSTANT(bool, value =  +              sizeof(aux::is_bind_helper(static_cast<T*>(0)))  +                == sizeof(aux::yes_tag) +            ); +    }; +}; + +template< typename T > struct is_bind_template +    : is_bind_template_impl< ::cutl_details_boost::detail::is_reference_impl<T>::value > +        ::template result_<T> +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/bind.hpp>)) +#include BOOST_PP_ITERATE() + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ +    && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +/// if_/eval_if specializations +#   define AUX778076_SPEC_NAME if_ +#   define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <cutl/details/boost/mpl/bind.hpp>)) +#   include BOOST_PP_ITERATE() + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +#   define AUX778076_SPEC_NAME eval_if +#   define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <cutl/details/boost/mpl/bind.hpp>)) +#   include BOOST_PP_ITERATE() +#endif +#endif + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ +    && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX bind +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include <cutl/details/boost/mpl/aux_/count_args.hpp> +} + +// bind +template< +      typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() +    > +struct bind +    : aux::bind_chooser< +          aux::bind_count_args<AUX778076_BIND_PARAMS(T)>::value +        >::template result_< F,AUX778076_BIND_PARAMS(T) >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( +      BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +    , bind +    ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( +      BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +    , bind +    ) + + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#   undef AUX778076_BIND_NESTED_DEFAULT_PARAMS +#   undef AUX778076_BIND_N_SPEC_PARAMS +#   undef AUX778076_BIND_N_PARAMS +#   undef AUX778076_BIND_DEFAULT_PARAMS +#   undef AUX778076_BIND_PARAMS +#   undef AUX778076_DMC_PARAM +#   undef AUX778076_APPLY + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +#   define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(AUX778076_SPEC_NAME) + +// lazy metafunction specialization +template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > +struct BOOST_PP_CAT(quote,i_); + +template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; + +template< +      typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(bind,i_)<  +      BOOST_PP_CAT(quote,i_)<AUX778076_SPEC_NAME,Tag> +    AUX778076_BIND_N_PARAMS(i_,T) +    > +{ +    template< +          AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) +        > +    struct apply +    { +     private: +        typedef mpl::arg<1> n1; +#       define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <cutl/details/boost/mpl/bind.hpp>)) +#       include BOOST_PP_ITERATE() + +        typedef typename AUX778076_SPEC_NAME< +              typename t1::type +            , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) +            >::type f_; + +     public: +        typedef typename f_::type type; +    }; +}; + +#undef AUX778076_SPEC_NAME + +#else // AUX778076_SPEC_NAME + +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() +    > +struct BOOST_PP_CAT(bind,i_) +{ +    template< +          AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) +        > +    struct apply +    { +     private: +#   if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +        typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; +        typedef typename r0::type a0; +        typedef typename r0::next n1; +        typedef typename aux::resolve_bind_arg<a0,AUX778076_BIND_PARAMS(U)>::type f_; +        /// +#   else +        typedef typename aux::resolve_bind_arg<F,AUX778076_BIND_PARAMS(U)>::type f_; + +#   endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +#   if i_ > 0 +#       define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <cutl/details/boost/mpl/bind.hpp>)) +#       include BOOST_PP_ITERATE() +#   endif + +     public: + +#   define AUX778076_ARG(unused, i_, t) \ +    BOOST_PP_COMMA_IF(i_) \ +    typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ +/**/ + +        typedef typename BOOST_PP_CAT(apply_wrap,i_)< +              f_  +            BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) +            >::type type; + +#   undef AUX778076_ARG +    }; +}; + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) +    > +struct resolve_bind_arg< +      BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>,AUX778076_BIND_PARAMS(U) +    > +{ +    typedef BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)> f_; +    typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#else + +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) +    > +aux::yes_tag +is_bind_helper(BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>*); + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) + +#   if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +     +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() +    > +struct bind +    : BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) > +{ +}; +#else +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() +    > +struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > +    : BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) > +{ +}; +#endif + +#   else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace aux { + +template<> +struct bind_chooser<i_> +{ +    template< +          typename F, AUX778076_BIND_PARAMS(typename T) +        > +    struct result_ +    { +        typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; +    }; +}; + +} // namespace aux + +#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#   endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif // AUX778076_SPEC_NAME + +#   undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +#   define j_ BOOST_PP_FRAME_ITERATION(2) +#   if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +        typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); +        typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); +        typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); +        typedef aux::resolve_bind_arg<BOOST_PP_CAT(a,j_), AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); +        /// +#   else +        typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); + +#   endif +#   undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/bind_fwd.hpp b/libcutl/cutl/details/boost/mpl/bind_fwd.hpp new file mode 100644 index 0000000..5d510d4 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/bind_fwd.hpp @@ -0,0 +1,99 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED +#define BOOST_MPL_BIND_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/aux_/na.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/bind.hpp> +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/default_params.hpp> +#   include <cutl/details/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> + +#   include <cutl/details/boost/preprocessor/comma_if.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +namespace cutl_details_boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +#   if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +#       define AUX778076_DMC_PARAM() , int dummy_ = 0 +#   else +#       define AUX778076_DMC_PARAM() +#   endif + +#   define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ +    BOOST_MPL_PP_DEFAULT_PARAMS( \ +          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ +        , param \ +        , value \ +        ) \ +    AUX778076_DMC_PARAM() \ +    /**/ + +#   define AUX778076_BIND_N_PARAMS(n, param) \ +    BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ +    AUX778076_DMC_PARAM() \ +    /**/ + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< +      typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) +    > +struct bind; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/bind_fwd.hpp>)) +#include BOOST_PP_ITERATE() + +#   undef AUX778076_BIND_N_PARAMS +#   undef AUX778076_BIND_DEFAULT_PARAMS +#   undef AUX778076_DMC_PARAM +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< +      typename F AUX778076_BIND_N_PARAMS(i_, typename T) +    > +struct BOOST_PP_CAT(bind,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/bool.hpp b/libcutl/cutl/details/boost/mpl/bool.hpp new file mode 100644 index 0000000..aa18d5c --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/bool.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_BOOL_HPP_INCLUDED +#define BOOST_MPL_BOOL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/bool_fwd.hpp> +#include <cutl/details/boost/mpl/integral_c_tag.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_ +{ +    BOOST_STATIC_CONSTANT(bool, value = C_); +    typedef integral_c_tag tag; +    typedef bool_ type; +    typedef bool value_type; +    operator bool() const { return this->value; } +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< bool C_ > +bool const bool_<C_>::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_BOOL_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/bool_fwd.hpp b/libcutl/cutl/details/boost/mpl/bool_fwd.hpp new file mode 100644 index 0000000..a7168f9 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/bool_fwd.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED +#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_; + +// shorcuts +typedef bool_<true> true_; +typedef bool_<false> false_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) + +#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/eval_if.hpp b/libcutl/cutl/details/boost/mpl/eval_if.hpp new file mode 100644 index 0000000..b70c59d --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/eval_if.hpp @@ -0,0 +1,71 @@ + +#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED +#define BOOST_MPL_EVAL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $ +// $Date: 2010-05-11 14:33:24 -0700 (Tue, 11 May 2010) $ +// $Revision: 61921 $ + +#include <cutl/details/boost/mpl/if.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +namespace cutl_details_boost { namespace mpl { + +template< +      typename BOOST_MPL_AUX_NA_PARAM(C) +    , typename BOOST_MPL_AUX_NA_PARAM(F1) +    , typename BOOST_MPL_AUX_NA_PARAM(F2) +    > +struct eval_if +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +     || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ +        && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ +        ) +{ +    typedef typename if_<C,F1,F2>::type f_; +    typedef typename f_::type type; +#else +    : if_<C,F1,F2>::type +{ +#endif +    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) +}; + +// (almost) copy & paste in order to save one more  +// recursively nested template instantiation to user +template< +      bool C +    , typename F1 +    , typename F2 +    > +struct eval_if_c +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +     || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ +        && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ +        ) +{ +    typedef typename if_c<C,F1,F2>::type f_; +    typedef typename f_::type type; +#else +    : if_c<C,F1,F2>::type +{ +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(3, eval_if) + +}} + +#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/has_xxx.hpp b/libcutl/cutl/details/boost/mpl/has_xxx.hpp new file mode 100644 index 0000000..a4488ec --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/has_xxx.hpp @@ -0,0 +1,640 @@ + +#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2006 +// Copyright David Abrahams 2002-2003 +// Copyright Daniel Walker 2007 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $ +// $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $ +// $Revision: 64146 $ + +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#include <cutl/details/boost/mpl/aux_/config/gcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/has_xxx.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc_typename.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#include <cutl/details/boost/preprocessor/array/elem.hpp> +#include <cutl/details/boost/preprocessor/cat.hpp> +#include <cutl/details/boost/preprocessor/control/if.hpp> +#include <cutl/details/boost/preprocessor/repetition/enum_params.hpp> +#include <cutl/details/boost/preprocessor/repetition/enum_trailing_params.hpp> + +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) +# include <cutl/details/boost/type_traits/is_class.hpp> +#endif + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +#   if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET  +// newsgroup's posting by John Madsen (comp.lang.c++.moderated,  +// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but  +// it works way more reliably than the SFINAE-based implementation + +// Modified dwa 8/Oct/02 to handle reference types. + +#   include <cutl/details/boost/mpl/if.hpp> +#   include <cutl/details/boost/mpl/bool.hpp> + +namespace cutl_details_boost { namespace mpl { namespace aux { + +struct has_xxx_tag; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +template< typename U > struct msvc_incomplete_array +{ +    typedef char (&type)[sizeof(U) + 1]; +}; +#endif + +template< typename T > +struct msvc_is_incomplete +{ +    // MSVC is capable of some kinds of SFINAE.  If U is an incomplete +    // type, it won't pick the second overload +    static char tester(...); + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +    template< typename U > +    static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>); +#else +    template< typename U > +    static char (& tester(type_wrapper<U>) )[sizeof(U)+1]; +#endif  +     +    BOOST_STATIC_CONSTANT(bool, value =  +          sizeof(tester(type_wrapper<T>())) == 1 +        ); +}; + +template<> +struct msvc_is_incomplete<int> +{ +    BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}}} + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ +template< typename T, typename name = ::cutl_details_boost::mpl::aux::has_xxx_tag > \ +struct BOOST_PP_CAT(trait,_impl) : T \ +{ \ +    static cutl_details_boost::mpl::aux::no_tag \ +    test(void(*)(::cutl_details_boost::mpl::aux::has_xxx_tag)); \ +    \ +    static cutl_details_boost::mpl::aux::yes_tag test(...); \ +    \ +    BOOST_STATIC_CONSTANT(bool, value = \ +          sizeof(test(static_cast<void(*)(name)>(0))) \ +            != sizeof(cutl_details_boost::mpl::aux::no_tag) \ +        ); \ +    typedef cutl_details_boost::mpl::bool_<value> type; \ +}; \ +\ +template< typename T, typename fallback_ = cutl_details_boost::mpl::bool_<default_> > \ +struct trait \ +    : cutl_details_boost::mpl::if_c< \ +          cutl_details_boost::mpl::aux::msvc_is_incomplete<T>::value \ +        , cutl_details_boost::mpl::bool_<false> \ +        , BOOST_PP_CAT(trait,_impl)<T> \ +        >::type \ +{ \ +}; \ +\ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ +/**/ + +#   define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ +template<> struct trait<T> \ +{ \ +    BOOST_STATIC_CONSTANT(bool, value = false); \ +    typedef cutl_details_boost::mpl::bool_<false> type; \ +}; \ +/**/ + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ +    BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ +    BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ +/**/ +#else +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ +    BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ +/**/ +#endif + + +// SFINAE-based implementations below are derived from a USENET newsgroup's  +// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) + +#   elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ +      || BOOST_WORKAROUND(__IBMCPP__, <= 700) + +// MSVC 7.1+ & VACPP + +// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE +// applied to partial specialization to fix some apparently random failures  +// (thanks to Daniel Wallin for researching this!) + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T > \ +struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \ +{ \ +    typedef void type; \ +};\ +\ +template< typename T, typename U = void > \ +struct BOOST_PP_CAT(trait,_impl_) \ +{ \ +    BOOST_STATIC_CONSTANT(bool, value = false); \ +    typedef cutl_details_boost::mpl::bool_<value> type; \ +}; \ +\ +template< typename T > \ +struct BOOST_PP_CAT(trait,_impl_)< \ +      T \ +    , typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \ +    > \ +{ \ +    BOOST_STATIC_CONSTANT(bool, value = true); \ +    typedef cutl_details_boost::mpl::bool_<value> type; \ +}; \ +\ +template< typename T, typename fallback_ = cutl_details_boost::mpl::bool_<default_> > \ +struct trait \ +    : BOOST_PP_CAT(trait,_impl_)<T> \ +{ \ +}; \ +/**/ + +#   elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \ +template< typename T, bool IS_CLASS > \ +struct trait_tester \ +{ \ +    BOOST_STATIC_CONSTANT( bool,  value = false ); \ +}; \ +template< typename T > \ +struct trait_tester< T, true > \ +{ \ +    struct trait_tester_impl \ +    { \ +        template < class U > \ +        static int  resolve( cutl_details_boost::mpl::aux::type_wrapper<U> const volatile * \ +                           , cutl_details_boost::mpl::aux::type_wrapper<typename U::name >* = 0 ); \ +        static char resolve( ... ); \ +    }; \ +    typedef cutl_details_boost::mpl::aux::type_wrapper<T> t_; \ +    BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \ +}; \ +template< typename T, typename fallback_ = cutl_details_boost::mpl::bool_<default_> > \ +struct trait           \ +{                      \ +    BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, cutl_details_boost::is_class< T >::value >::value) );     \ +    typedef cutl_details_boost::mpl::bool_< trait< T, fallback_ >::value > type; \ +}; + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +    BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \ +                                         , BOOST_PP_CAT(trait,_tester)      \ +                                         , name       \ +                                         , default_ ) \ +/**/ + +#   else // other SFINAE-capable compilers + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = cutl_details_boost::mpl::bool_<default_> > \ +struct trait \ +{ \ +    struct gcc_3_2_wknd \ +    { \ +        template< typename U > \ +        static cutl_details_boost::mpl::aux::yes_tag test( \ +              cutl_details_boost::mpl::aux::type_wrapper<U> const volatile* \ +            , cutl_details_boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \ +            ); \ +    \ +        static cutl_details_boost::mpl::aux::no_tag test(...); \ +    }; \ +    \ +    typedef cutl_details_boost::mpl::aux::type_wrapper<T> t_; \ +    BOOST_STATIC_CONSTANT(bool, value = \ +          sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \ +            == sizeof(cutl_details_boost::mpl::aux::yes_tag) \ +        ); \ +    typedef cutl_details_boost::mpl::bool_<value> type; \ +}; \ +/**/ + +#   endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + +#else // BOOST_MPL_CFG_NO_HAS_XXX + +// placeholder implementation + +#   define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = cutl_details_boost::mpl::bool_<default_> > \ +struct trait \ +{ \ +    BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ +    typedef fallback_ type; \ +}; \ +/**/ + +#endif + +#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ +    BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ +/**/ + + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + +// Create a boolean Metafunction to detect a nested template +// member. This implementation is based on a USENET newsgroup's +// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), +// Rani Sharoni's USENET posting cited above, the non-template has_xxx +// implementations above, and discussion on the Boost mailing list. + +#   if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) +#     if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +#       define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +#     endif +#   endif + +#   if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) +#     if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) +#       define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +#     endif +#   endif + +#   if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) +#     if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +#       define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +#     endif +#   endif + +// NOTE: Many internal implementation macros take a Boost.Preprocessor +// array argument called args which is of the following form. +//           ( 4, ( trait, name, max_arity, default_ ) ) + +#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ +      BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ +    /**/ + +#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ +      BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ +    /**/ + +#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ +      BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ +    /**/ + +// Thanks to Guillaume Melquiond for pointing out the need for the +// "substitute" template as an argument to the overloaded test +// functions to get SFINAE to work for member templates with the +// correct name but different number of arguments. +#   define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ +      template< \ +          template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ +       > \ +      struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ +      }; \ +    /**/ + +#   define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ +      BOOST_PP_REPEAT( \ +          BOOST_PP_ARRAY_ELEM(2, args) \ +        , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ +        , args \ +      ) \ +    /**/ + +#   if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +#     define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ +        template< typename V > \ +        static cutl_details_boost::mpl::aux::no_tag \ +        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ +      /**/ +#   else +#     define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ +        static cutl_details_boost::mpl::aux::no_tag \ +        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ +      /**/ +#   endif + +#   if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +#     define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ +        template< typename V > \ +        static cutl_details_boost::mpl::aux::yes_tag \ +        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ +            cutl_details_boost::mpl::aux::type_wrapper< V > const volatile* \ +          , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ +                V::template BOOST_PP_ARRAY_ELEM(1, args) \ +            >* = 0 \ +        ); \ +      /**/ +#     define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ +        BOOST_PP_REPEAT( \ +            BOOST_PP_ARRAY_ELEM(2, args) \ +          , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ +          , args \ +        ) \ +      /**/ +#   else +#     define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ +        template< typename V > \ +        static cutl_details_boost::mpl::aux::yes_tag \ +        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ +            V const volatile* \ +          , member_macro(args, V, T)* = 0 \ +        ); \ +      /**/ +#   endif + +#   if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +#     define BOOST_MPL_HAS_MEMBER_TEST(args) \ +          sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ +              == sizeof(cutl_details_boost::mpl::aux::yes_tag) \ +      /**/ +#   else +#     if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +#       define BOOST_MPL_HAS_MEMBER_TEST(args) \ +          sizeof( \ +              BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ +                  static_cast< cutl_details_boost::mpl::aux::type_wrapper< U >* >(0) \ +              ) \ +          ) == sizeof(cutl_details_boost::mpl::aux::yes_tag) \ +        /**/ +#     else +#       define BOOST_MPL_HAS_MEMBER_TEST(args) \ +          sizeof( \ +              BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ +                  static_cast< U* >(0) \ +              ) \ +          ) == sizeof(cutl_details_boost::mpl::aux::yes_tag) \ +        /**/ +#     endif +#   endif + +#   define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ +               args, substitute_macro, member_macro \ +           ) \ +      template< typename U > \ +      struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ +          BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ +          BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ +          BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ +          BOOST_STATIC_CONSTANT( \ +              bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ +          ); \ +          typedef cutl_details_boost::mpl::bool_< value > type; \ +      }; \ +    /**/ + +#   define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ +               args, introspect_macro, substitute_macro, member_macro \ +           ) \ +      template< \ +          typename T \ +        , typename fallback_ \ +              = cutl_details_boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ +      > \ +      class BOOST_PP_ARRAY_ELEM(0, args) { \ +          introspect_macro(args, substitute_macro, member_macro) \ +      public: \ +          static const bool value \ +              = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ +          typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ +              T \ +          >::type type; \ +      }; \ +    /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full +// implementation of the function-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +#   define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ +               args, substitute_macro, member_macro \ +           ) \ +      BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ +          args \ +        , BOOST_MPL_HAS_MEMBER_INTROSPECT \ +        , substitute_macro \ +        , member_macro \ +      ) \ +    /**/ + +#   if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +#     if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) +#       if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +#         define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 +#       endif +#     endif + +#     if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE +#       define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ +                   args, n \ +               ) \ +          BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ +        /**/ +#     else +#       define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ +                   args, n \ +               ) \ +          BOOST_PP_CAT( \ +              boost_mpl_has_xxx_ \ +            , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ +          ) \ +        /**/ +#     endif + +#     define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ +                 args \ +             ) \ +        BOOST_PP_CAT( \ +            BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ +                args, 0 \ +            ) \ +          , _tag \ +        ) \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ +                 z, n, args \ +             ) \ +        template< \ +             template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ +        > \ +        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ +                args, n \ +               ) { \ +            typedef \ +                BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ +                type; \ +        }; \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ +                 args, substitute_macro \ +             ) \ +        typedef void \ +            BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ +        BOOST_PP_REPEAT( \ +            BOOST_PP_ARRAY_ELEM(2, args) \ +          , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ +          , args \ +        ) \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ +                 args, member_macro \ +             ) \ +        template< \ +            typename U \ +          , typename V \ +                = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ +        > \ +        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ +            BOOST_STATIC_CONSTANT(bool, value = false); \ +            typedef cutl_details_boost::mpl::bool_< value > type; \ +        }; \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ +                 z, n, args \ +             ) \ +        template< typename U > \ +        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ +            U \ +          , typename \ +                BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ +                    args, n \ +                )< \ +                    BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ +                >::type \ +        > { \ +            BOOST_STATIC_CONSTANT(bool, value = true); \ +            typedef cutl_details_boost::mpl::bool_< value > type; \ +        }; \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ +                 args, member_macro \ +             ) \ +        BOOST_PP_REPEAT( \ +            BOOST_PP_ARRAY_ELEM(2, args) \ +          , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ +          , args \ +        ) \ +      /**/ + +#     define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ +                 args, substitute_macro, member_macro \ +             ) \ +        BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ +        BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ +        template< typename U > \ +        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ +            : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ +        }; \ +      /**/ +  +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full +// implementation of the template-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +// +// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is +// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs +// to be expanded at namespace level before +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. +#     define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ +                 args, substitute_macro, member_macro \ +             ) \ +        BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ +            args, substitute_macro \ +        ) \ +        BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ +            args \ +          , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ +          , substitute_macro \ +          , member_macro \ +        ) \ +      /**/ + +#   endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +// Note: In the current implementation the parameter and access macros +// are no longer expanded. +#   if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +#     define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ +        BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ +            ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ +          , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ +          , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ +        ) \ +      /**/ +#   else +#     define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ +        BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ +            ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ +          , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ +          , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ +        ) \ +      /**/ +#   endif + +#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +// placeholder implementation + +#   define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ +      template< typename T \ +              , typename fallback_ = cutl_details_boost::mpl::bool_< default_ > > \ +      struct trait { \ +          BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ +          typedef fallback_ type; \ +      }; \ +    /**/ + +#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +#   define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ +      BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ +          BOOST_PP_CAT(has_, name), name, false \ +      ) \ +    /**/ + +#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/identity.hpp b/libcutl/cutl/details/boost/mpl/identity.hpp new file mode 100644 index 0000000..4f4828f --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/identity.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED +#define BOOST_MPL_IDENTITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_support.hpp> + +namespace cutl_details_boost { namespace mpl { + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    > +struct identity +{ +    typedef T type; +    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) +}; + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    > +struct make_identity +{ +    typedef identity<T> type; +    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) +}; + +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) + +}} + +#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/if.hpp b/libcutl/cutl/details/boost/mpl/if.hpp new file mode 100644 index 0000000..2b91da4 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/if.hpp @@ -0,0 +1,135 @@ + +#ifndef BOOST_MPL_IF_HPP_INCLUDED +#define BOOST_MPL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/value_wknd.hpp> +#include <cutl/details/boost/mpl/aux_/static_cast.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#include <cutl/details/boost/mpl/aux_/config/integral.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +namespace cutl_details_boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< +      bool C +    , typename T1 +    , typename T2 +    > +struct if_c +{ +    typedef T1 type; +}; + +template< +      typename T1 +    , typename T2 +    > +struct if_c<false,T1,T2> +{ +    typedef T2 type; +}; + +// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars +// (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 +template< +      typename BOOST_MPL_AUX_NA_PARAM(T1) +    , typename BOOST_MPL_AUX_NA_PARAM(T2) +    , typename BOOST_MPL_AUX_NA_PARAM(T3) +    > +struct if_ +{ + private: +    // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC  +    typedef if_c< +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) +          BOOST_MPL_AUX_VALUE_WKND(T1)::value +#else +          BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value) +#endif +        , T2 +        , T3 +        > almost_type_; +  + public: +    typedef typename almost_type_::type type; +     +    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) +}; + +#else + +// no partial class template specialization + +namespace aux { + +template< bool C > +struct if_impl +{ +    template< typename T1, typename T2 > struct result_ +    { +        typedef T1 type; +    }; +}; + +template<> +struct if_impl<false> +{ +    template< typename T1, typename T2 > struct result_ +    {  +        typedef T2 type; +    }; +}; + +} // namespace aux + +template< +      bool C_ +    , typename T1 +    , typename T2 +    > +struct if_c +{ +    typedef typename aux::if_impl< C_ > +        ::template result_<T1,T2>::type type; +}; + +// (almost) copy & paste in order to save one more  +// recursively nested template instantiation to user +template< +      typename BOOST_MPL_AUX_NA_PARAM(C_) +    , typename BOOST_MPL_AUX_NA_PARAM(T1) +    , typename BOOST_MPL_AUX_NA_PARAM(T2) +    > +struct if_ +{ +    enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; + +    typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > +        ::template result_<T1,T2>::type type; + +    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +BOOST_MPL_AUX_NA_SPEC(3, if_) + +}} + +#endif // BOOST_MPL_IF_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/int.hpp b/libcutl/cutl/details/boost/mpl/int.hpp new file mode 100644 index 0000000..89e0841 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/int.hpp @@ -0,0 +1,22 @@ + +#ifndef BOOST_MPL_INT_HPP_INCLUDED +#define BOOST_MPL_INT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/int_fwd.hpp> + +#define AUX_WRAPPER_VALUE_TYPE int +#include <cutl/details/boost/mpl/aux_/integral_wrapper.hpp> + +#endif // BOOST_MPL_INT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/int_fwd.hpp b/libcutl/cutl/details/boost/mpl/int_fwd.hpp new file mode 100644 index 0000000..8489e0a --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/int_fwd.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED +#define BOOST_MPL_INT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) + +#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/integral_c.hpp b/libcutl/cutl/details/boost/mpl/integral_c.hpp new file mode 100644 index 0000000..eba13b3 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/integral_c.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/integral_c_fwd.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__HP_aCC, <= 53800) +// the type of non-type template arguments may not depend on template arguments +#   define AUX_WRAPPER_PARAMS(N) typename T, long N +#else +#   define AUX_WRAPPER_PARAMS(N) typename T, T N +#endif + +#define AUX_WRAPPER_NAME integral_c +#define AUX_WRAPPER_VALUE_TYPE T +#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > +#include <cutl/details/boost/mpl/aux_/integral_wrapper.hpp> + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +// 'bool' constant doesn't have 'next'/'prior' members +template< bool C > +struct integral_c<bool, C> +{ +    BOOST_STATIC_CONSTANT(bool, value = C); +    typedef integral_c_tag tag; +    typedef integral_c type; +    typedef bool value_type; +    operator bool() const { return this->value; } +}; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +#endif + +#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/integral_c_fwd.hpp b/libcutl/cutl/details/boost/mpl/integral_c_fwd.hpp new file mode 100644 index 0000000..a296cbc --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/integral_c_fwd.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +#if BOOST_WORKAROUND(__HP_aCC, <= 53800) +// the type of non-type template arguments may not depend on template arguments +template< typename T, long N > struct integral_c; +#else +template< typename T, T N > struct integral_c; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c) + +#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/integral_c_tag.hpp b/libcutl/cutl/details/boost/mpl/integral_c_tag.hpp new file mode 100644 index 0000000..ef8ba45 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/integral_c_tag.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag) + +#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/is_placeholder.hpp b/libcutl/cutl/details/boost/mpl/is_placeholder.hpp new file mode 100644 index 0000000..c290fd3 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/is_placeholder.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/arg_fwd.hpp> +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/yes_no.hpp> +#include <cutl/details/boost/mpl/aux_/type_wrapper.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#include <cutl/details/boost/mpl/aux_/config/static_constant.hpp> + +namespace cutl_details_boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T > +struct is_placeholder +    : bool_<false> +{ +}; + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct is_placeholder< arg<N> > +    : bool_<true> +{ +}; + +#else + +namespace aux { + +aux::no_tag is_placeholder_helper(...); + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*); + +} // namespace aux + +template< typename T > +struct is_placeholder +{ +    static aux::type_wrapper<T>* get(); +    BOOST_STATIC_CONSTANT(bool, value =  +          sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) +        ); +     +    typedef bool_<value> type; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}} + +#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/lambda.hpp b/libcutl/cutl/details/boost/mpl/lambda.hpp new file mode 100644 index 0000000..515c437 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/lambda.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/lambda_fwd.hpp> +#include <cutl/details/boost/mpl/bind.hpp> +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +#   include <cutl/details/boost/mpl/aux_/full_lambda.hpp> +#else +#   include <cutl/details/boost/mpl/aux_/lambda_no_ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#   define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/lambda_fwd.hpp b/libcutl/cutl/details/boost/mpl/lambda_fwd.hpp new file mode 100644 index 0000000..b380e71 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/lambda_fwd.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: lambda_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/void_fwd.hpp> +#include <cutl/details/boost/mpl/aux_/na.hpp> +#include <cutl/details/boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +#   include <cutl/details/boost/mpl/int.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_arity_param.hpp> +#   include <cutl/details/boost/mpl/aux_/template_arity_fwd.hpp> + +namespace cutl_details_boost { namespace mpl { + +template<  +      typename T = na +    , typename Tag = void_ +    BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( +          typename Arity = int_< aux::template_arity<T>::value > +        ) +    > +struct lambda; + +}} + +#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#   include <cutl/details/boost/mpl/bool.hpp> + +namespace cutl_details_boost { namespace mpl { + +template<  +      typename T = na +    , typename Tag = void_ +    , typename Protect = true_ +    >  +struct lambda; + +}} + +#endif + +#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/limits/arity.hpp b/libcutl/cutl/details/boost/mpl/limits/arity.hpp new file mode 100644 index 0000000..9da70ab --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/limits/arity.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED +#define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +#   define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 +#endif + +#endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/next.hpp b/libcutl/cutl/details/boost/mpl/next.hpp new file mode 100644 index 0000000..8178e2c --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/next.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_NEXT_HPP_INCLUDED +#define BOOST_MPL_NEXT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: next.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/next_prior.hpp> + +#endif // BOOST_MPL_NEXT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/next_prior.hpp b/libcutl/cutl/details/boost/mpl/next_prior.hpp new file mode 100644 index 0000000..f4f24d4 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/next_prior.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: next_prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/common_name_wknd.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_support.hpp> + +namespace cutl_details_boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(next) +BOOST_MPL_AUX_COMMON_NAME_WKND(prior) + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    > +struct next +{ +    typedef typename T::next type; +    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) +}; + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    > +struct prior +{ +    typedef typename T::prior type; +    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, next) +BOOST_MPL_AUX_NA_SPEC(1, prior) + +}} + +#endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/not.hpp b/libcutl/cutl/details/boost/mpl/not.hpp new file mode 100644 index 0000000..18f8adc --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/not.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_NOT_HPP_INCLUDED +#define BOOST_MPL_NOT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: not.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/nested_type_wknd.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/lambda_support.hpp> + +namespace cutl_details_boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here +struct not_impl +    : bool_<!C_> +{ +}; + +} // namespace aux + + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    > +struct not_ +    : aux::not_impl< +          BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value +        > +{ +    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1,not_) + +}} + +#endif // BOOST_MPL_NOT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/or.hpp b/libcutl/cutl/details/boost/mpl/or.hpp new file mode 100644 index 0000000..1b1f783 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/or.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_OR_HPP_INCLUDED +#define BOOST_MPL_OR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: or.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ +    && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   include <cutl/details/boost/mpl/bool.hpp> +#   include <cutl/details/boost/mpl/aux_/nested_type_wknd.hpp> +#   include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#   include <cutl/details/boost/mpl/aux_/lambda_support.hpp> +#   include <cutl/details/boost/mpl/aux_/config/msvc.hpp> + +// agurt, 19/may/04: workaround a conflict with <iso646.h> header's  +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// has to be checked in a separate condition, otherwise GCC complains  +// about 'or' being an alternative token +#if defined(_MSC_VER) +#ifndef __GCCXML__ +#if defined(or) +#   pragma push_macro("or") +#   undef or +#   define or(x) +#endif +#endif +#endif + +#   define BOOST_MPL_PREPROCESSED_HEADER or.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#if defined(_MSC_VER)  +#ifndef __GCCXML__ +#if defined(or) +#   pragma pop_macro("or") +#endif +#endif +#endif + +#else + +#   define AUX778076_OP_NAME or_ +#   define AUX778076_OP_VALUE1 true +#   define AUX778076_OP_VALUE2 false +#   include <cutl/details/boost/mpl/aux_/logical_op.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_OR_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/placeholders.hpp b/libcutl/cutl/details/boost/mpl/placeholders.hpp new file mode 100644 index 0000000..8ff3679 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/placeholders.hpp @@ -0,0 +1,100 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: placeholders.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/arg.hpp> +#   include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +#   if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) +#       define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ +        using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ +        /**/ +#   else +#       define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ +#   endif + +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +// watch out for GNU gettext users, who #define _(x) +#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<-1> _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace cutl_details_boost { namespace mpl {  + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} +#endif + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#'  +/// specialization +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, <cutl/details/boost/mpl/placeholders.hpp>)) +#include BOOST_PP_ITERATE() + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +typedef arg<i_> BOOST_PP_CAT(_,i_); + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace cutl_details_boost { namespace mpl {  + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); +} + +}} + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/protect.hpp b/libcutl/cutl/details/boost/mpl/protect.hpp new file mode 100644 index 0000000..2def86b --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/protect.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_PROTECT_HPP_INCLUDED +#define BOOST_MPL_PROTECT_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/arity.hpp> +#include <cutl/details/boost/mpl/aux_/config/dtp.hpp> +#include <cutl/details/boost/mpl/aux_/nttp_decl.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> + +namespace cutl_details_boost { namespace mpl { + +template< +      typename BOOST_MPL_AUX_NA_PARAM(T) +    , int not_le_ = 0 +    > +struct protect : T +{ +#if BOOST_WORKAROUND(__EDG_VERSION__, == 238) +    typedef mpl::protect type; +#else +    typedef protect type; +#endif +}; + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +namespace aux {  +template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > +struct arity< protect<T>, N >  +    : arity<T,N> +{  +}; +} // namespace aux +#endif + +BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) +#endif + +}} + +#endif // BOOST_MPL_PROTECT_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/quote.hpp b/libcutl/cutl/details/boost/mpl/quote.hpp new file mode 100644 index 0000000..f181455 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/quote.hpp @@ -0,0 +1,151 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED +#define BOOST_MPL_QUOTE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: quote.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ +// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49272 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +#   include <cutl/details/boost/mpl/void.hpp> +#   include <cutl/details/boost/mpl/aux_/has_type.hpp> +#endif + +#include <cutl/details/boost/mpl/aux_/config/bcc.hpp> +#include <cutl/details/boost/mpl/aux_/config/ttp.hpp> + +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ +    && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) +#   define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE +#endif + +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ +    && defined(BOOST_MPL_CFG_NO_HAS_XXX) +#   define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#include <cutl/details/boost/mpl/aux_/config/use_preprocessed.hpp> + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +#   define BOOST_MPL_PREPROCESSED_HEADER quote.hpp +#   include <cutl/details/boost/mpl/aux_/include_preprocessed.hpp> + +#else + +#   include <cutl/details/boost/mpl/limits/arity.hpp> +#   include <cutl/details/boost/mpl/aux_/preprocessor/params.hpp> +#   include <cutl/details/boost/mpl/aux_/config/ctps.hpp> +#   include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +#   include <cutl/details/boost/preprocessor/iterate.hpp> +#   include <cutl/details/boost/preprocessor/cat.hpp> + +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) + +namespace cutl_details_boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T, bool has_type_ > +struct quote_impl +// GCC has a problem with metafunction forwarding when T is a +// specialization of a template called 'type'. +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ +    && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ +    && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) +{ +    typedef typename T::type type; +}; +# else  +    : T +{ +}; +# endif  + +template< typename T > +struct quote_impl<T,false> +{ +    typedef T type; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< bool > struct quote_impl +{ +    template< typename T > struct result_ +        : T +    { +    }; +}; + +template<> struct quote_impl<false> +{ +    template< typename T > struct result_ +    { +        typedef T type; +    }; +}; + +#endif  + +#define BOOST_PP_ITERATION_PARAMS_1 \ +    (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <cutl/details/boost/mpl/quote.hpp>)) +#include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_QUOTE_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< +      template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F +    , typename Tag = void_ +    > +struct BOOST_PP_CAT(quote,i_) +{ +    template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply +#if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) +    { +        typedef typename quote_impl< +              F< BOOST_MPL_PP_PARAMS(i_, U) > +            , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value +            >::type type; +    }; +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +        : quote_impl< +              F< BOOST_MPL_PP_PARAMS(i_, U) > +            , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value +            > +    { +    }; +#else +        : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > +            ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > +    { +    }; +#endif +}; + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/libcutl/cutl/details/boost/mpl/size_t.hpp b/libcutl/cutl/details/boost/mpl/size_t.hpp new file mode 100644 index 0000000..b7b8cb3 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/size_t.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_SIZE_T_HPP_INCLUDED +#define BOOST_MPL_SIZE_T_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: size_t.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/size_t_fwd.hpp> + +#define AUX_WRAPPER_VALUE_TYPE std::size_t +#define AUX_WRAPPER_NAME size_t +#define AUX_WRAPPER_PARAMS(N) std::size_t N + +#include <cutl/details/boost/mpl/aux_/integral_wrapper.hpp> + +#endif // BOOST_MPL_SIZE_T_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/size_t_fwd.hpp b/libcutl/cutl/details/boost/mpl/size_t_fwd.hpp new file mode 100644 index 0000000..5e5475e --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/size_t_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED +#define BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: size_t_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> +#include <cutl/details/boost/config.hpp> // make sure 'size_t' is placed into 'std' +#include <cstddef> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< std::size_t N > struct size_t; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t) + +#endif // BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/void.hpp b/libcutl/cutl/details/boost/mpl/void.hpp new file mode 100644 index 0000000..c260152 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/void.hpp @@ -0,0 +1,76 @@ + +#ifndef BOOST_MPL_VOID_HPP_INCLUDED +#define BOOST_MPL_VOID_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: void.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/void_fwd.hpp> +#include <cutl/details/boost/mpl/bool.hpp> +#include <cutl/details/boost/mpl/aux_/na_spec.hpp> +#include <cutl/details/boost/mpl/aux_/config/msvc.hpp> +#include <cutl/details/boost/mpl/aux_/config/workaround.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +//  [JDG Feb-4-2003] made void_ a complete type to allow it to be +//  instantiated so that it can be passed in as an object that can be +//  used to select an overloaded function. Possible use includes signaling +//  a zero arity functor evaluation call. +struct void_ { typedef void_ type; }; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace cutl_details_boost { namespace mpl { + +template< typename T > +struct is_void_ +    : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using false_::value; +#endif +}; + +template<> +struct is_void_<void_> +    : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using true_::value; +#endif +}; + +template< typename T > +struct is_not_void_ +    : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using true_::value; +#endif +}; + +template<> +struct is_not_void_<void_> +    : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +    using false_::value; +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(1, is_void_) +BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) + +}} + +#endif // BOOST_MPL_VOID_HPP_INCLUDED diff --git a/libcutl/cutl/details/boost/mpl/void_fwd.hpp b/libcutl/cutl/details/boost/mpl/void_fwd.hpp new file mode 100644 index 0000000..b59b025 --- /dev/null +++ b/libcutl/cutl/details/boost/mpl/void_fwd.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED +#define BOOST_MPL_VOID_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// 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) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id: void_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ +// $Revision: 49267 $ + +#include <cutl/details/boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct void_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) + +#endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED  | 
