9
3

value_at_impl.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_VALUE_AT_IMPL_20060223_2025)
  8. #define BOOST_FUSION_VALUE_AT_IMPL_20060223_2025
  9. namespace example
  10. {
  11. struct example_sequence_tag;
  12. }
  13. namespace boost { namespace fusion {
  14. namespace extension
  15. {
  16. template<typename Tag>
  17. struct value_at_impl;
  18. template<>
  19. struct value_at_impl<example::example_sequence_tag>
  20. {
  21. template<typename Sequence, typename N>
  22. struct apply;
  23. template<typename Sequence>
  24. struct apply<Sequence, mpl::int_<0> >
  25. {
  26. typedef std::string type;
  27. };
  28. template<typename Sequence>
  29. struct apply<Sequence, mpl::int_<1> >
  30. {
  31. typedef int type;
  32. };
  33. };
  34. }
  35. }}
  36. #endif