convert_impl.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*=============================================================================
  2. Copyright (c) 2005-2012 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(FUSION_CONVERT_IMPL_20061213_2207)
  8. #define FUSION_CONVERT_IMPL_20061213_2207
  9. #include <boost/fusion/container/deque/convert.hpp>
  10. #include <boost/fusion/container/deque/deque.hpp>
  11. #include <boost/fusion/sequence/intrinsic/begin.hpp>
  12. #include <boost/fusion/sequence/intrinsic/size.hpp>
  13. namespace boost { namespace fusion
  14. {
  15. struct deque_tag;
  16. namespace result_of
  17. {
  18. template <typename Sequence>
  19. struct as_deque;
  20. }
  21. namespace extension
  22. {
  23. template <typename T>
  24. struct convert_impl;
  25. template <>
  26. struct convert_impl<deque_tag>
  27. {
  28. template <typename Sequence>
  29. struct apply
  30. {
  31. typedef result_of::as_deque<Sequence> gen;
  32. typedef typename gen::type type;
  33. static type call(Sequence& seq)
  34. {
  35. return gen::call(seq);
  36. }
  37. };
  38. };
  39. }
  40. }}
  41. #endif