BVB Source Codes

mars Show has_rebind.hpp Source code

Return Download mars: download has_rebind.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
  3. #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
  4.  
  5. // Copyright Aleksey Gurtovoy 2002-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/msvc.hpp>
  18. #include <boost/mpl/aux_/config/intel.hpp>
  19. #include <boost/mpl/aux_/config/workaround.hpp>
  20.  
  21. #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
  22. #   include <boost/mpl/has_xxx.hpp>
  23. #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
  24. #   include <boost/mpl/has_xxx.hpp>
  25. #   include <boost/mpl/if.hpp>
  26. #   include <boost/mpl/bool.hpp>
  27. #   include <boost/mpl/aux_/msvc_is_class.hpp>
  28. #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
  29. #   include <boost/mpl/if.hpp>
  30. #   include <boost/mpl/bool.hpp>
  31. #   include <boost/mpl/aux_/yes_no.hpp>
  32. #   include <boost/mpl/aux_/config/static_constant.hpp>
  33. #   include <boost/type_traits/is_class.hpp>
  34. #else
  35. #   include <boost/mpl/aux_/type_wrapper.hpp>
  36. #   include <boost/mpl/aux_/yes_no.hpp>
  37. #   include <boost/mpl/aux_/config/static_constant.hpp>
  38. #endif
  39.  
  40. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl { namespace aux {
  41.  
  42. #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
  43.  
  44. BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
  45.  
  46. #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
  47.  
  48. BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
  49.  
  50. template< typename T >
  51. struct has_rebind
  52.     : if_<
  53.           msvc_is_class<T>
  54.         , has_rebind_impl<T>
  55.         , bool_<false>
  56.         >::type
  57. {
  58. };
  59.  
  60. #else // the rest
  61.  
  62. template< typename T > struct has_rebind_tag {};
  63. no_tag operator|(has_rebind_tag<int>, void const volatile*);
  64.  
  65. #   if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
  66. template< typename T >
  67. struct has_rebind
  68. {
  69.     static has_rebind_tag<T>* get();
  70.     BOOST_STATIC_CONSTANT(bool, value =
  71.           sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
  72.         );
  73. };
  74. #   else // __BORLANDC__
  75. template< typename T >
  76. struct has_rebind_impl
  77. {
  78.     static T* get();
  79.     BOOST_STATIC_CONSTANT(bool, value =
  80.           sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
  81.         );
  82. };
  83.  
  84. template< typename T >
  85. struct has_rebind
  86.     : if_<
  87.           is_class<T>
  88.         , has_rebind_impl<T>
  89.         , bool_<false>
  90.         >::type
  91. {
  92. };
  93. #   endif // __BORLANDC__
  94.  
  95. #endif
  96.  
  97. }}}
  98.  
  99. #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
  100.  
downloadhas_rebind.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