empty_impl.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Copyright (c) 2007 Tobias Schwinger
  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_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED)
  7. #define BOOST_FUSION_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/type_traits/is_convertible.hpp>
  10. #include <boost/fusion/container/list/nil.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. struct cons_tag;
  14. struct nil_;
  15. template <typename Car, typename Cdr>
  16. struct cons;
  17. namespace extension
  18. {
  19. template <typename Tag>
  20. struct empty_impl;
  21. template <>
  22. struct empty_impl<cons_tag>
  23. {
  24. template <typename Sequence>
  25. struct apply
  26. : boost::is_convertible<Sequence, nil_>
  27. {};
  28. };
  29. }
  30. }}
  31. #endif