is_index_list.hpp 978 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Copyright 2003-2013 Joaquin M Lopez Munoz.
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * See http://www.boost.org/libs/multi_index for library home page.
  7. */
  8. #ifndef BOOST_MULTI_INDEX_DETAIL_IS_INDEX_LIST_HPP
  9. #define BOOST_MULTI_INDEX_DETAIL_IS_INDEX_LIST_HPP
  10. #if defined(_MSC_VER)
  11. #pragma once
  12. #endif
  13. #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
  14. #include <boost/mpl/empty.hpp>
  15. #include <boost/mpl/is_sequence.hpp>
  16. namespace boost{
  17. namespace multi_index{
  18. namespace detail{
  19. template<typename T>
  20. struct is_index_list
  21. {
  22. BOOST_STATIC_CONSTANT(bool,mpl_sequence=mpl::is_sequence<T>::value);
  23. BOOST_STATIC_CONSTANT(bool,non_empty=!mpl::empty<T>::value);
  24. BOOST_STATIC_CONSTANT(bool,value=mpl_sequence&&non_empty);
  25. };
  26. } /* namespace multi_index::detail */
  27. } /* namespace multi_index */
  28. } /* namespace boost */
  29. #endif