BVB Source Codes

mars Show template_arity.hpp Source code

Return Download mars: download template_arity.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. // Copyright Aleksey Gurtovoy 2001-2004
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8.  
  9. // *Preprocessed* version of the main "template_arity.hpp" header
  10. // -- DO NOT modify by hand!
  11.  
  12. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl { namespace aux {
  13. template< int N > struct arity_tag
  14. {
  15.     typedef char (&type)[N + 1];
  16. };
  17.  
  18. template<
  19.       int C1, int C2, int C3, int C4, int C5, int C6
  20.     >
  21. struct max_arity
  22. {
  23.     BOOST_STATIC_CONSTANT(int, value =
  24.           ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
  25.         );
  26. };
  27.  
  28. arity_tag<0>::type arity_helper(...);
  29.  
  30. template<
  31.       template< typename P1 > class F
  32.     , typename T1
  33.     >
  34. typename arity_tag<1>::type
  35. arity_helper(type_wrapper< F<T1> >, arity_tag<1>);
  36.  
  37. template<
  38.       template< typename P1, typename P2 > class F
  39.     , typename T1, typename T2
  40.     >
  41. typename arity_tag<2>::type
  42. arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>);
  43.  
  44. template<
  45.       template< typename P1, typename P2, typename P3 > class F
  46.     , typename T1, typename T2, typename T3
  47.     >
  48. typename arity_tag<3>::type
  49. arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>);
  50.  
  51. template<
  52.       template< typename P1, typename P2, typename P3, typename P4 > class F
  53.     , typename T1, typename T2, typename T3, typename T4
  54.     >
  55. typename arity_tag<4>::type
  56. arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>);
  57.  
  58. template<
  59.       template<
  60.           typename P1, typename P2, typename P3, typename P4
  61.         , typename P5
  62.         >
  63.       class F
  64.     , typename T1, typename T2, typename T3, typename T4, typename T5
  65.     >
  66. typename arity_tag<5>::type
  67. arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>);
  68.  
  69. template<
  70.       template<
  71.           typename P1, typename P2, typename P3, typename P4
  72.         , typename P5, typename P6
  73.         >
  74.       class F
  75.     , typename T1, typename T2, typename T3, typename T4, typename T5
  76.     , typename T6
  77.     >
  78. typename arity_tag<6>::type
  79. arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>);
  80. template< typename F, int N >
  81. struct template_arity_impl
  82. {
  83.     BOOST_STATIC_CONSTANT(int, value =
  84.           sizeof(::mars_boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
  85.         );
  86. };
  87.  
  88. template< typename F >
  89. struct template_arity
  90. {
  91.     BOOST_STATIC_CONSTANT(int, value  = (
  92.           max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value
  93.         ));
  94.     typedef mpl::int_<value> type;
  95. };
  96.  
  97. }}}
  98.  
downloadtemplate_arity.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