1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef BOOST_MP11_DETAIL_MP_FRONT_HPP_INCLUDED
- #define BOOST_MP11_DETAIL_MP_FRONT_HPP_INCLUDED
- #include <boost/mp11/detail/mp_value.hpp>
- #include <boost/mp11/detail/config.hpp>
- namespace boost
- {
- namespace mp11
- {
- namespace detail
- {
- template<class L> struct mp_front_impl
- {
- };
- template<template<class...> class L, class T1, class... T> struct mp_front_impl<L<T1, T...>>
- {
- using type = T1;
- };
- #if defined(BOOST_MP11_HAS_TEMPLATE_AUTO)
- template<template<auto...> class L, auto A1, auto... A> struct mp_front_impl<L<A1, A...>>
- {
- using type = mp_value<A1>;
- };
- #endif
- }
- template<class L> using mp_front = typename detail::mp_front_impl<L>::type;
- }
- }
- #endif
|