value_at_impl.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*=============================================================================
  2. Copyright (c) 2009 Hartmut Kaiser
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM)
  7. #define BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/sequence/intrinsic/value_at.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct nview_tag;
  13. namespace extension
  14. {
  15. template<typename Tag>
  16. struct value_at_impl;
  17. template<>
  18. struct value_at_impl<nview_tag>
  19. {
  20. template<typename Sequence, typename N>
  21. struct apply
  22. {
  23. typedef typename Sequence::sequence_type sequence_type;
  24. typedef typename Sequence::index_type index_type;
  25. typedef typename result_of::at<index_type, N>::type index;
  26. typedef typename result_of::at<sequence_type, index>::type type;
  27. };
  28. };
  29. }
  30. }}
  31. #endif