/*! @file Defines `boost::hana::empty`. @copyright Louis Dionne 2013-2017 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 BOOST_HANA_NAMESPACE_BEGIN //! @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(); } }; BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_EMPTY_HPP