#ifndef BHO_MP11_DETAIL_MP_FRONT_HPP_INCLUDED #define BHO_MP11_DETAIL_MP_FRONT_HPP_INCLUDED // Copyright 2015-2023 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 #include namespace bho { namespace mp11 { // mp_front namespace detail { template struct mp_front_impl { // An error "no type named 'type'" here means that the argument to mp_front // is either not a list, or is an empty list }; template class L, class T1, class... T> struct mp_front_impl> { using type = T1; }; #if defined(BHO_MP11_HAS_TEMPLATE_AUTO) template class L, auto A1, auto... A> struct mp_front_impl> { using type = mp_value; }; #endif } // namespace detail template using mp_front = typename detail::mp_front_impl::type; } // namespace mp11 } // namespace bho #endif // #ifndef BHO_MP11_DETAIL_MP_FRONT_HPP_INCLUDED