BVB Source Codes

mars Show lambda_support.hpp Source code

Return Download mars: download lambda_support.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
  3. #define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
  4.  
  5. // Copyright Aleksey Gurtovoy 2001-2004
  6. //
  7. // Distributed under the Boost Software License, Version 1.0.
  8. // (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. //
  11. // See http://www.boost.org/libs/mpl for documentation.
  12.  
  13. // $Id$
  14. // $Date$
  15. // $Revision$
  16.  
  17. #include <boost/mpl/aux_/config/lambda.hpp>
  18.  
  19. #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
  20.  
  21. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/
  22. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
  23.  
  24. #else
  25.  
  26. #   include <boost/mpl/int_fwd.hpp>
  27. #   include <boost/mpl/aux_/yes_no.hpp>
  28. #   include <boost/mpl/aux_/na_fwd.hpp>
  29. #   include <boost/mpl/aux_/preprocessor/params.hpp>
  30. #   include <boost/mpl/aux_/preprocessor/enum.hpp>
  31. #   include <boost/mpl/aux_/config/msvc.hpp>
  32. #   include <boost/mpl/aux_/config/workaround.hpp>
  33.  
  34. #   include <boost/preprocessor/tuple/to_list.hpp>
  35. #   include <boost/preprocessor/list/for_each_i.hpp>
  36. #   include <boost/preprocessor/inc.hpp>
  37. #   include <boost/preprocessor/cat.hpp>
  38.  
  39. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \
  40.     typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
  41.     /**/
  42.  
  43. // agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++
  44. #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
  45.  
  46. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
  47.     typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
  48.     BOOST_PP_LIST_FOR_EACH_I_R( \
  49.           1 \
  50.         , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
  51.         , typedef \
  52.         , BOOST_PP_TUPLE_TO_LIST(i,params) \
  53.         ) \
  54.     struct rebind \
  55.     { \
  56.         template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
  57.             : name< BOOST_MPL_PP_PARAMS(i,U) > \
  58.         { \
  59.         }; \
  60.     }; \
  61.     /**/
  62.  
  63. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  64.     BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
  65.     /**/
  66.  
  67. #elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
  68. // agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9
  69. // (in strict mode), so we have to provide an alternative to the
  70. // MSVC-optimized implementation
  71.  
  72. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  73.     typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
  74.     BOOST_PP_LIST_FOR_EACH_I_R( \
  75.           1 \
  76.         , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
  77.         , typedef \
  78.         , BOOST_PP_TUPLE_TO_LIST(i,params) \
  79.         ) \
  80.     struct rebind; \
  81. /**/
  82.  
  83. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
  84.     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  85. }; \
  86. template< BOOST_MPL_PP_PARAMS(i,typename T) > \
  87. struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
  88. { \
  89.     template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
  90.         : name< BOOST_MPL_PP_PARAMS(i,U) > \
  91.     { \
  92.     }; \
  93. /**/
  94.  
  95. #else // __EDG_VERSION__
  96.  
  97. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl { namespace aux {
  98. template< typename T > struct has_rebind_tag;
  99. }}}
  100.  
  101. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  102.     typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
  103.     BOOST_PP_LIST_FOR_EACH_I_R( \
  104.           1 \
  105.         , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
  106.         , typedef \
  107.         , BOOST_PP_TUPLE_TO_LIST(i,params) \
  108.         ) \
  109.     friend class BOOST_PP_CAT(name,_rebind); \
  110.     typedef BOOST_PP_CAT(name,_rebind) rebind; \
  111. /**/
  112.  
  113. #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
  114. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
  115. template< BOOST_MPL_PP_PARAMS(i,typename T) > \
  116. ::mars_boost::mpl::aux::yes_tag operator|( \
  117.       ::mars_boost::mpl::aux::has_rebind_tag<int> \
  118.     , name<BOOST_MPL_PP_PARAMS(i,T)>* \
  119.     ); \
  120. ::mars_boost::mpl::aux::no_tag operator|( \
  121.       ::mars_boost::mpl::aux::has_rebind_tag<int> \
  122.     , name< BOOST_MPL_PP_ENUM(i,::mars_boost::mpl::na) >* \
  123.     ); \
  124. /**/
  125. #elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
  126. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
  127. template< BOOST_MPL_PP_PARAMS(i,typename T) > \
  128. ::mars_boost::mpl::aux::yes_tag operator|( \
  129.       ::mars_boost::mpl::aux::has_rebind_tag<int> \
  130.     , ::mars_boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
  131.     ); \
  132. /**/
  133. #else
  134. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/
  135. #endif
  136.  
  137. #   if !defined(__BORLANDC__)
  138. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
  139.     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  140. }; \
  141. BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
  142. class BOOST_PP_CAT(name,_rebind) \
  143. { \
  144.  public: \
  145.     template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
  146.         : name< BOOST_MPL_PP_PARAMS(i,U) > \
  147.     { \
  148.     }; \
  149. /**/
  150. #   else
  151. #   define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
  152.     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
  153. }; \
  154. BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
  155. class BOOST_PP_CAT(name,_rebind) \
  156. { \
  157.  public: \
  158.     template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
  159.     { \
  160.         typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
  161.     }; \
  162. /**/
  163. #   endif // __BORLANDC__
  164.  
  165. #endif // __EDG_VERSION__
  166.  
  167. #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
  168.  
  169. #endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
  170.  
downloadlambda_support.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top