nil.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2005, 2014 Eric Niebler
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(FUSION_NIL_04232014_0843)
  8. #define FUSION_NIL_04232014_0843
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/container/list/cons_fwd.hpp>
  11. #include <boost/fusion/support/sequence_base.hpp>
  12. #include <boost/mpl/int.hpp>
  13. #include <boost/mpl/bool.hpp>
  14. namespace boost { namespace fusion
  15. {
  16. struct void_;
  17. struct cons_tag;
  18. struct forward_traversal_tag;
  19. struct fusion_sequence_tag;
  20. struct nil_ : sequence_base<nil_>
  21. {
  22. typedef mpl::int_<0> size;
  23. typedef cons_tag fusion_tag;
  24. typedef fusion_sequence_tag tag; // this gets picked up by MPL
  25. typedef mpl::false_ is_view;
  26. typedef forward_traversal_tag category;
  27. typedef void_ car_type;
  28. typedef void_ cdr_type;
  29. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  30. nil_() BOOST_NOEXCEPT {}
  31. template <typename Iterator>
  32. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  33. nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) BOOST_NOEXCEPT
  34. {}
  35. template <typename Iterator>
  36. BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  37. void assign_from_iter(Iterator const& /*iter*/) BOOST_NOEXCEPT
  38. {
  39. }
  40. };
  41. }}
  42. #endif