at_impl.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2005-2006 Dan Marsden
  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_AT_IMPL_31122005_1642)
  8. #define BOOST_FUSION_AT_IMPL_31122005_1642
  9. #include <boost/mpl/at.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct mpl_sequence_tag;
  13. namespace extension
  14. {
  15. template<typename Tag>
  16. struct at_impl;
  17. template <>
  18. struct at_impl<mpl_sequence_tag>
  19. {
  20. template <typename Sequence, typename N>
  21. struct apply
  22. {
  23. typedef typename mpl::at<Sequence, N>::type type;
  24. static type
  25. call(Sequence)
  26. {
  27. return type();
  28. }
  29. };
  30. };
  31. }
  32. }}
  33. #endif