/*! @file Defines `boost::hana::drop_front`. @copyright Louis Dionne 2013-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_DROP_FRONT_HPP #define BOOST_HANA_DROP_FRONT_HPP #include #include #include #include #include #include #include BOOST_HANA_NAMESPACE_BEGIN //! @cond template constexpr auto drop_front_t::operator()(Xs&& xs, N const& n) const { using It = typename hana::tag_of::type; using DropFront = BOOST_HANA_DISPATCH_IF(drop_front_impl, hana::Iterable::value && hana::IntegralConstant::value ); #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS static_assert(hana::Iterable::value, "hana::drop_front(xs, n) requires 'xs' to be an Iterable"); static_assert(hana::IntegralConstant::value, "hana::drop_front(xs, n) requires 'n' to be an IntegralConstant"); #endif return DropFront::apply(static_cast(xs), n); } template constexpr auto drop_front_t::operator()(Xs&& xs) const { return (*this)(static_cast(xs), hana::size_t<1>{}); } //! @endcond template struct drop_front_impl> : default_ { template static constexpr auto apply(Xs&&, N const&) = delete; }; BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_DROP_FRONT_HPP