BVB Source Codes

mars Show arithmetic_op.hpp Source code

Return Download mars: download arithmetic_op.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
  3.  
  4. // Copyright Aleksey Gurtovoy 2000-2004
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See http://www.boost.org/libs/mpl for documentation.
  11.  
  12. // $Id$
  13. // $Date$
  14. // $Revision$
  15.  
  16. #if !defined(BOOST_MPL_PREPROCESSING_MODE)
  17. #   include <boost/mpl/integral_c.hpp>
  18. #   include <boost/mpl/aux_/largest_int.hpp>
  19. #   include <boost/mpl/aux_/value_wknd.hpp>
  20. #endif
  21.  
  22. #if !defined(AUX778076_OP_PREFIX)
  23. #   define AUX778076_OP_PREFIX AUX778076_OP_NAME
  24. #endif
  25.  
  26. #include <boost/mpl/aux_/numeric_op.hpp>
  27. #include <boost/mpl/aux_/config/static_constant.hpp>
  28. #include <boost/mpl/aux_/config/use_preprocessed.hpp>
  29.  
  30. #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
  31.     && !defined(BOOST_MPL_PREPROCESSING_MODE)
  32.  
  33. #   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
  34. #   include <boost/mpl/aux_/include_preprocessed.hpp>
  35.  
  36. #else
  37.  
  38. #   include <boost/mpl/aux_/config/workaround.hpp>
  39. #   include <boost/preprocessor/cat.hpp>
  40.  
  41.  
  42. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl {
  43.  
  44. #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
  45. namespace aux {
  46. template< typename T, T n1, T n2 >
  47. struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)
  48. {
  49.     BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2));
  50.     typedef integral_c<T,value> type;
  51. };
  52. }
  53. #endif
  54.  
  55. template<>
  56. struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
  57. {
  58.     template< typename N1, typename N2 > struct apply
  59. #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
  60.         : integral_c<
  61.               typename aux::largest_int<
  62.                   typename N1::value_type
  63.                 , typename N2::value_type
  64.                 >::type
  65.             , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
  66.                   AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value
  67.                 )
  68.             >
  69. #else
  70.         : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<
  71.               typename aux::largest_int<
  72.                   typename N1::value_type
  73.                 , typename N2::value_type
  74.                 >::type
  75.             , N1::value
  76.             , N2::value
  77.             >::type
  78. #endif
  79.     {
  80.     };
  81. };
  82.  
  83. }}
  84.  
  85. #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
  86.  
  87. #undef AUX778076_OP_TAG_NAME
  88. #undef AUX778076_OP_IMPL_NAME
  89. #undef AUX778076_OP_ARITY
  90. #undef AUX778076_OP_PREFIX
  91. #undef AUX778076_OP_NAME
  92. #undef AUX778076_OP_TOKEN
  93.  
downloadarithmetic_op.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