Ticket #9441: dtemplate_params.patch

File dtemplate_params.patch, 2.2 KB (added by anonymous, 9 years ago)

Hacks to dtemplate_params.hpp to allow specific parameters usage to work with Sun compiler.

  • boost/tti/detail/dtemplate_params.hpp

    diff -aur boost_1_55_0-orig/boost/tti/detail/dtemplate_params.hpp boost_1_55_0-working/boost/tti/detail/dtemplate_params.hpp
    old new  
    2020#include <boost/preprocessor/array/enum.hpp>
    2121#include <boost/preprocessor/array/size.hpp>
    2222
     23#if (defined __SUNPRO_CC)
     24
     25#     define BOOST_TTI_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \
     26        template< typename V > \
     27        static boost::mpl::aux::yes_tag \
     28        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
     29            boost::mpl::aux::type_wrapper< V > const volatile* \
     30          , typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \
     31                U::template BOOST_PP_ARRAY_ELEM(1, args) \
     32            >::type* = 0 \
     33        ); \
     34      /**/
     35
     36#else
     37
     38#     define BOOST_TTI_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \
     39        template< typename V > \
     40        static boost::mpl::aux::yes_tag \
     41        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
     42            boost::mpl::aux::type_wrapper< V > const volatile* \
     43          , typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \
     44                V::template BOOST_PP_ARRAY_ELEM(1, args) \
     45            >::type* = 0 \
     46        ); \
     47      /**/
     48
     49#endif
     50
     51#     define BOOST_TTI_HAS_MEMBER_ACCEPT(args, member_macro) \
     52        BOOST_PP_REPEAT( \
     53            BOOST_PP_ARRAY_ELEM(2, args) \
     54          , BOOST_TTI_HAS_MEMBER_MULTI_ACCEPT \
     55          , args \
     56        ) \
     57      /**/
     58
    2359#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE)
    2460
    2561#define BOOST_TTI_DETAIL_TEMPLATE_PARAMETERS(z,n,args) \
    … …  
    67103    class BOOST_TTI_DETAIL_TM_V \
    68104    > \
    69105  struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
    70     { \
     106    { typedef void type; \
    71107    }; \
    72108/**/
    73109
    … …  
    86122    { \
    87123    BOOST_TTI_DETAIL_HAS_MEMBER_SUBSTITUTE(args) \
    88124    BOOST_MPL_HAS_MEMBER_REJECT(args, BOOST_PP_NIL) \
    89     BOOST_MPL_HAS_MEMBER_ACCEPT(args, BOOST_PP_NIL) \
     125    BOOST_TTI_HAS_MEMBER_ACCEPT(args, BOOST_PP_NIL) \
    90126    BOOST_STATIC_CONSTANT \
    91127      ( \
    92128      bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \