BVB Source Codes

mars Show udt_builtin_mixture.hpp Source code

Return Download mars: download udt_builtin_mixture.hpp Source code - Download mars Source code - Type:.hpp
  1. //  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
  2. //  Use, modification, and distribution is subject to the Boost Software
  3. //  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. //  http://www.boost.org/LICENSE_1_0.txt)
  5.  
  6. //  See library home page at http://www.boost.org/libs/numeric/conversion
  7. //
  8. // Contact the author at: fernando_cacciola@hotmail.com
  9. //
  10. #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
  11. #define BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
  12.  
  13. #include "boost/type_traits/is_arithmetic.hpp"
  14.  
  15. #include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp"
  16. #include "boost/numeric/conversion/detail/meta.hpp"
  17.  
  18. #include "boost/mpl/integral_c.hpp"
  19.  
  20. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace numeric { namespace convdetail
  21. {
  22.   // Integral Constants for 'UdtMixture'
  23.   typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
  24.   typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt>     builtin2udt_c ;
  25.   typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin>     udt2builtin_c ;
  26.   typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt>         udt2udt_c ;
  27.  
  28.   // Metafunction:
  29.   //
  30.   //   for_udt_mixture<UdtMixture,BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt>::type
  31.   //
  32.   // {UdtMixture} is one of the Integral Constants for UdMixture, declared above.
  33.   // {BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt} are aribtrary types. (not metafunctions)
  34.   //
  35.   // According to the value of 'UdtMixture', selects the corresponding type.
  36.   //
  37.   template<class UdtMixture, class BuiltIn2BuiltIn, class BuiltIn2Udt, class Udt2BuiltIn, class Udt2Udt>
  38.   struct for_udt_builtin_mixture
  39.   {
  40.     typedef typename
  41.       ct_switch4<UdtMixture
  42.                  , builtin2builtin_c, builtin2udt_c, udt2builtin_c // default
  43.                  , BuiltIn2BuiltIn  , BuiltIn2Udt  , Udt2BuiltIn  , Udt2Udt
  44.                 >::type
  45.         type ;
  46.   } ;
  47.  
  48.   // Metafunction:
  49.   //
  50.   //   get_udt_mixture<T,S>::type
  51.   //
  52.   // Selects the appropriate UdtMixture Integral Constant for the combination T,S.
  53.   //
  54.   template<class T,class S>
  55.   struct get_udt_builtin_mixture
  56.   {
  57.     typedef is_arithmetic<S> S_builtin ;
  58.     typedef is_arithmetic<T> T_builtin ;
  59.  
  60.     typedef typename
  61.       for_both<S_builtin, T_builtin, builtin2builtin_c, builtin2udt_c, udt2builtin_c, udt2udt_c>::type
  62.         type ;
  63.   } ;
  64.  
  65. } } } // namespace mars_boost::numeric::convdetail
  66.  
  67. #endif
  68.  
  69.  
  70.  
downloadudt_builtin_mixture.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