value_at_impl.hpp 967 B

12345678910111213141516171819202122232425262728293031323334
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  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(FUSION_VALUE_AT_IMPL_05052005_0232)
  7. #define FUSION_VALUE_AT_IMPL_05052005_0232
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/mpl/at.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct vector_tag;
  13. namespace extension
  14. {
  15. template <typename Tag>
  16. struct value_at_impl;
  17. template <>
  18. struct value_at_impl<vector_tag>
  19. {
  20. template <typename Sequence, typename N>
  21. struct apply
  22. {
  23. typedef typename mpl::at<typename Sequence::types, N>::type type;
  24. };
  25. };
  26. }
  27. }}
  28. #endif