/Src/Dependencies/Boost/boost/fusion/container/list/detail/end_impl.hpp

http://hadesmem.googlecode.com/ · C++ Header · 51 lines · 35 code · 9 blank · 7 comment · 0 complexity · 90bc1c27da223df191e7867c6264cbc4 MD5 · raw file

  1. /*=============================================================================
  2. Copyright (c) 2005 Joel de Guzman
  3. Copyright (c) 2005 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(FUSION_END_IMPL_07172005_0828)
  8. #define FUSION_END_IMPL_07172005_0828
  9. #include <boost/mpl/if.hpp>
  10. #include <boost/type_traits/is_const.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. struct nil;
  14. struct cons_tag;
  15. template <typename Car, typename Cdr>
  16. struct cons;
  17. template <typename Cons>
  18. struct cons_iterator;
  19. namespace extension
  20. {
  21. template <typename Tag>
  22. struct end_impl;
  23. template <>
  24. struct end_impl<cons_tag>
  25. {
  26. template <typename Sequence>
  27. struct apply
  28. {
  29. typedef cons_iterator<
  30. typename mpl::if_<is_const<Sequence>, nil const, nil>::type>
  31. type;
  32. static type
  33. call(Sequence&)
  34. {
  35. return type();
  36. }
  37. };
  38. };
  39. }
  40. }}
  41. #endif