mirror of
https://github.com/boostorg/mp11.git
synced 2025-08-06 07:44:31 +02:00
Move mp_is_list to detail/mp_is_list.hpp
This commit is contained in:
39
include/boost/mp11/detail/mp_is_list.hpp
Normal file
39
include/boost/mp11/detail/mp_is_list.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED
|
||||
#define BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED
|
||||
|
||||
// Copyright 2015-2019 Peter Dimov.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/mp11/integral.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace mp11
|
||||
{
|
||||
|
||||
// mp_is_list<L>
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<class L> struct mp_is_list_impl
|
||||
{
|
||||
using type = mp_false;
|
||||
};
|
||||
|
||||
template<template<class...> class L, class... T> struct mp_is_list_impl<L<T...>>
|
||||
{
|
||||
using type = mp_true;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<class L> using mp_is_list = typename detail::mp_is_list_impl<L>::type;
|
||||
|
||||
} // namespace mp11
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_MP11_DETAIL_MP_IS_LIST_HPP_INCLUDED
|
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/detail/mp_list.hpp>
|
||||
#include <boost/mp11/detail/mp_is_list.hpp>
|
||||
#include <boost/mp11/detail/mp_append.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <type_traits>
|
||||
@@ -23,22 +24,7 @@ namespace mp11
|
||||
template<class T, T... I> using mp_list_c = mp_list<std::integral_constant<T, I>...>;
|
||||
|
||||
// mp_is_list<L>
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<class L> struct mp_is_list_impl
|
||||
{
|
||||
using type = mp_false;
|
||||
};
|
||||
|
||||
template<template<class...> class L, class... T> struct mp_is_list_impl<L<T...>>
|
||||
{
|
||||
using type = mp_true;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<class L> using mp_is_list = typename detail::mp_is_list_impl<L>::type;
|
||||
// in detail/mp_is_list.hpp
|
||||
|
||||
// mp_size<L>
|
||||
namespace detail
|
||||
|
Reference in New Issue
Block a user