mp_is_list.hpp 800 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED
  2. #define BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED
  3. // Copyright 2015-2019 Peter Dimov.
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. //
  7. // See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt
  9. #include <boost/mp11/integral.hpp>
  10. namespace boost
  11. {
  12. namespace mp11
  13. {
  14. // mp_is_list<L>
  15. namespace detail
  16. {
  17. template<class L> struct mp_is_list_impl
  18. {
  19. using type = mp_false;
  20. };
  21. template<template<class...> class L, class... T> struct mp_is_list_impl<L<T...>>
  22. {
  23. using type = mp_true;
  24. };
  25. } // namespace detail
  26. template<class L> using mp_is_list = typename detail::mp_is_list_impl<L>::type;
  27. } // namespace mp11
  28. } // namespace boost
  29. #endif // #ifndef BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED