size_impl.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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(BOOST_FUSION_SIZE_IMPL_09242011_1744)
  7. #define BOOST_FUSION_SIZE_IMPL_09242011_1744
  8. #include <boost/fusion/support/config.hpp>
  9. #include <tuple>
  10. #include <boost/mpl/int.hpp>
  11. #include <boost/type_traits/remove_const.hpp>
  12. namespace boost { namespace fusion
  13. {
  14. struct std_tuple_tag;
  15. namespace extension
  16. {
  17. template<typename T>
  18. struct size_impl;
  19. template <>
  20. struct size_impl<std_tuple_tag>
  21. {
  22. template <typename Sequence>
  23. struct apply :
  24. mpl::int_<std::tuple_size<
  25. typename remove_const<Sequence>::type>::value
  26. >
  27. {};
  28. };
  29. }
  30. }}
  31. #endif