BVB Source Codes

mars Show quote.hpp Source code

Return Download mars: download quote.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. #if !defined(BOOST_PP_IS_ITERATING)
  3.  
  4. ///// header body
  5.  
  6. #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED
  7. #define BOOST_MPL_QUOTE_HPP_INCLUDED
  8.  
  9. // Copyright Aleksey Gurtovoy 2000-2008
  10. //
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. //
  15. // See http://www.boost.org/libs/mpl for documentation.
  16.  
  17. // $Id$
  18. // $Date$
  19. // $Revision$
  20.  
  21. #if !defined(BOOST_MPL_PREPROCESSING_MODE)
  22. #   include <boost/mpl/void.hpp>
  23. #   include <boost/mpl/aux_/has_type.hpp>
  24. #endif
  25.  
  26. #include <boost/mpl/aux_/config/bcc.hpp>
  27. #include <boost/mpl/aux_/config/ttp.hpp>
  28.  
  29. #if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
  30.     && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS)
  31. #   define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
  32. #endif
  33.  
  34. #if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \
  35.     && defined(BOOST_MPL_CFG_NO_HAS_XXX)
  36. #   define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS
  37. #endif
  38.  
  39. #include <boost/mpl/aux_/config/use_preprocessed.hpp>
  40.  
  41. #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
  42.  && !defined(BOOST_MPL_PREPROCESSING_MODE)
  43.  
  44. #   define BOOST_MPL_PREPROCESSED_HEADER quote.hpp
  45. #   include <boost/mpl/aux_/include_preprocessed.hpp>
  46.  
  47. #else
  48.  
  49. #   include <boost/mpl/limits/arity.hpp>
  50. #   include <boost/mpl/aux_/preprocessor/params.hpp>
  51. #   include <boost/mpl/aux_/config/ctps.hpp>
  52. #   include <boost/mpl/aux_/config/workaround.hpp>
  53.  
  54. #   include <boost/preprocessor/iterate.hpp>
  55. #   include <boost/preprocessor/cat.hpp>
  56.  
  57. #if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE)
  58.  
  59. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl {
  60.  
  61. #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
  62.  
  63. template< typename T, bool has_type_ >
  64. struct quote_impl
  65. // GCC has a problem with metafunction forwarding when T is a
  66. // specialization of a template called 'type'.
  67. # if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \
  68.     && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \
  69.     && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2))
  70. {
  71.     typedef typename T::type type;
  72. };
  73. # else
  74.     : T
  75. {
  76. };
  77. # endif
  78.  
  79. template< typename T >
  80. struct quote_impl<T,false>
  81. {
  82.     typedef T type;
  83. };
  84.  
  85. #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  86.  
  87. template< bool > struct quote_impl
  88. {
  89.     template< typename T > struct result_
  90.         : T
  91.     {
  92.     };
  93. };
  94.  
  95. template<> struct quote_impl<false>
  96. {
  97.     template< typename T > struct result_
  98.     {
  99.         typedef T type;
  100.     };
  101. };
  102.  
  103. #endif
  104.  
  105. #define BOOST_PP_ITERATION_PARAMS_1 \
  106.     (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/quote.hpp>))
  107. #include BOOST_PP_ITERATE()
  108.  
  109. }}
  110.  
  111. #endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE
  112.  
  113. #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
  114. #endif // BOOST_MPL_QUOTE_HPP_INCLUDED
  115.  
  116. ///// iteration
  117.  
  118. #else
  119. #define i_ BOOST_PP_FRAME_ITERATION(1)
  120.  
  121. template<
  122.       template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F
  123.     , typename Tag = void_
  124.     >
  125. struct BOOST_PP_CAT(quote,i_)
  126. {
  127.     template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply
  128. #if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS)
  129.     {
  130.         typedef typename quote_impl<
  131.               F< BOOST_MPL_PP_PARAMS(i_, U) >
  132.             , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
  133.             >::type type;
  134.     };
  135. #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
  136.         : quote_impl<
  137.               F< BOOST_MPL_PP_PARAMS(i_, U) >
  138.             , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
  139.             >
  140.     {
  141.     };
  142. #else
  143.         : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >
  144.             ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > >
  145.     {
  146.     };
  147. #endif
  148. };
  149.  
  150. #undef i_
  151. #endif // BOOST_PP_IS_ITERATING
  152.  
downloadquote.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