/*! @file Defines `boost::hana::empty`. Copyright Louis Dionne 2013-2022 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_EMPTY_HPP #define BOOST_HANA_EMPTY_HPP #include #include #include #include #include #include namespace boost { namespace hana { //! @cond template constexpr auto empty_t::operator()() const { #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS static_assert(hana::MonadPlus::value, "hana::empty() requires 'M' to be a MonadPlus"); #endif using Empty = BOOST_HANA_DISPATCH_IF(empty_impl, hana::MonadPlus::value ); return Empty::apply(); } //! @endcond template struct empty_impl> : default_ { template static constexpr auto apply(Args&& ...) = delete; }; template struct empty_impl::value>> { static constexpr auto apply() { return hana::make(); } }; }} // end namespace boost::hana #endif // !BOOST_HANA_EMPTY_HPP