value_of_impl.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2011 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(BOOST_FUSION_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324)
  8. #define BOOST_FUSION_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/mpl/int.hpp>
  11. #include <boost/mpl/assert.hpp>
  12. #include <boost/mpl/equal_to.hpp>
  13. namespace boost { namespace fusion
  14. {
  15. struct single_view_iterator_tag;
  16. namespace extension
  17. {
  18. template <typename Tag>
  19. struct value_of_impl;
  20. template <>
  21. struct value_of_impl<single_view_iterator_tag>
  22. {
  23. template <typename Iterator>
  24. struct apply
  25. {
  26. BOOST_MPL_ASSERT((mpl::equal_to<typename Iterator::position, mpl::int_<0> >));
  27. typedef typename Iterator::value_type type;
  28. };
  29. };
  30. }
  31. }}
  32. #endif