BVB Source Codes

mars Show is_sequence.hpp Source code

Return Download mars: download is_sequence.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. #ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
  3. #define BOOST_MPL_IS_SEQUENCE_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/not.hpp>
  18. #include <boost/mpl/and.hpp>
  19. #include <boost/mpl/begin_end.hpp>
  20. #include <boost/mpl/if.hpp>
  21. #include <boost/mpl/bool.hpp>
  22. #include <boost/mpl/sequence_tag_fwd.hpp>
  23. #include <boost/mpl/identity.hpp>
  24. #include <boost/mpl/void.hpp>
  25. #include <boost/mpl/aux_/has_tag.hpp>
  26. #include <boost/mpl/aux_/has_begin.hpp>
  27. #include <boost/mpl/aux_/na_spec.hpp>
  28. #include <boost/mpl/aux_/lambda_support.hpp>
  29. #include <boost/mpl/aux_/config/eti.hpp>
  30. #include <boost/mpl/aux_/config/msvc.hpp>
  31. #include <boost/mpl/aux_/config/workaround.hpp>
  32. #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
  33. #   include <boost/mpl/aux_/msvc_is_class.hpp>
  34. #elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
  35. #   include <boost/type_traits/is_class.hpp>
  36. #endif
  37.  
  38. #include <boost/type_traits/is_same.hpp>
  39.  
  40. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl {
  41.  
  42. #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
  43.  
  44. namespace aux {
  45.  
  46. // agurt, 11/jun/03:
  47. // MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
  48. // 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
  49. // would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
  50. // the issue for most real-world cases
  51. template< typename T > struct is_sequence_impl
  52.     : and_<
  53.           identity< aux::has_tag<T> >
  54.         , identity< aux::has_begin<T> >
  55.         >
  56. {
  57. };
  58.  
  59. } // namespace aux
  60.        
  61. template<
  62.       typename BOOST_MPL_AUX_NA_PARAM(T)
  63.     >
  64. struct is_sequence
  65.     : if_<
  66. #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
  67.           aux::msvc_is_class<T>
  68. #else
  69.           mars_boost::is_class<T>
  70. #endif
  71.         , aux::is_sequence_impl<T>
  72.         , bool_<false>
  73.         >::type
  74. {
  75.     BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
  76. };
  77.  
  78. #elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
  79.  
  80. template<
  81.       typename BOOST_MPL_AUX_NA_PARAM(T)
  82.     >
  83. struct is_sequence
  84.     : bool_<false>
  85. {
  86. };
  87.  
  88. #else
  89.  
  90. template<
  91.       typename BOOST_MPL_AUX_NA_PARAM(T)
  92.     >
  93. struct is_sequence
  94.     : not_< is_same< typename begin<T>::type, void_ > >
  95. {
  96.     BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
  97. };
  98.  
  99. #endif // BOOST_MSVC
  100.  
  101. #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
  102. template<> struct is_sequence<int>
  103.     : bool_<false>
  104. {
  105. };
  106. #endif
  107.  
  108. BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
  109.  
  110. }}
  111.  
  112. #endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
  113.  
downloadis_sequence.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