BVB Source Codes

mars Show iterator.hpp Source code

Return Download mars: download iterator.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. #ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
  3. #define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
  4.  
  5. // Copyright Aleksey Gurtovoy 2003-2007
  6. // Copyright David Abrahams 2003-2004
  7. //
  8. // Distributed under the Boost Software License, Version 1.0.
  9. // (See accompanying file LICENSE_1_0.txt or copy at
  10. // http://www.boost.org/LICENSE_1_0.txt)
  11. //
  12. // See http://www.boost.org/libs/mpl for documentation.
  13.  
  14. // $Id$
  15. // $Date$
  16. // $Revision$
  17.  
  18. #include <boost/mpl/set/aux_/set0.hpp>
  19. #include <boost/mpl/has_key.hpp>
  20. #include <boost/mpl/iterator_tags.hpp>
  21. #include <boost/mpl/next.hpp>
  22. #include <boost/mpl/eval_if.hpp>
  23. #include <boost/mpl/if.hpp>
  24. #include <boost/mpl/identity.hpp>
  25. #include <boost/mpl/aux_/config/ctps.hpp>
  26.  
  27. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl {
  28.  
  29. // used by 's_iter_get'
  30. template< typename Set, typename Tail > struct s_iter;
  31.  
  32. template< typename Set, typename Tail > struct s_iter_get
  33.     : eval_if<
  34.           has_key< Set,typename Tail::item_type_ >
  35.         , identity< s_iter<Set,Tail> >
  36.         , next< s_iter<Set,Tail> >
  37.         >
  38. {
  39. };
  40.  
  41. template< typename Set, typename Tail > struct s_iter_impl
  42. {
  43.     typedef Tail                        tail_;
  44.     typedef forward_iterator_tag        category;
  45.     typedef typename Tail::item_type_   type;
  46.  
  47. #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
  48.     typedef typename s_iter_get< Set,typename Tail::base >::type next;
  49. #endif
  50. };
  51.  
  52. #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
  53.  
  54. template< typename Set, typename Tail >
  55. struct next< s_iter<Set,Tail> >
  56.     : s_iter_get< Set,typename Tail::base >
  57. {
  58. };
  59.  
  60. template< typename Set >
  61. struct next< s_iter<Set,set0<> > >
  62. {
  63.     typedef s_iter<Set,set0<> > type;
  64. };
  65.  
  66. template< typename Set, typename Tail > struct s_iter
  67.     : s_iter_impl<Set,Tail>
  68. {
  69. };
  70.  
  71. template< typename Set > struct s_iter<Set, set0<> >
  72. {
  73.     typedef forward_iterator_tag category;
  74. };
  75.  
  76. #else
  77.  
  78. template< typename Set >
  79. struct s_end_iter
  80. {
  81.     typedef forward_iterator_tag    category;
  82.     typedef s_iter<Set,set0<> >     next;
  83. };
  84.  
  85. template< typename Set, typename Tail > struct s_iter
  86.     : if_<
  87.           is_same< Tail,set0<> >
  88.         , s_end_iter<Set>
  89.         , s_iter_impl<Set,Tail>
  90.         >::type
  91. {
  92. };
  93.  
  94. #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  95.  
  96. }}
  97.  
  98. #endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
  99.  
downloaditerator.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