3 Forward declares `boost::hana::empty`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_EMPTY_HPP
11 #define BOOST_HANA_FWD_EMPTY_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Identity of the monadic combination `concat`.
19 //! @ingroup group-MonadPlus
23 //! Given a MonadPlus `M`, the signature is
24 //! @f$ \mathtt{empty}_M : \emptyset \to M(T) @f$.
27 //! The tag of the monadic structure to return. This must be
28 //! a model of the MonadPlus concept.
33 //! @include example/empty.cpp
34 #ifdef BOOST_HANA_DOXYGEN_INVOKED
36 constexpr auto empty = []() {
37 return tag-dispatched;
40 template <typename M, typename = void>
41 struct empty_impl : empty_impl<M, when<true>> { };
47 constexpr empty_t<M> empty{};
49 BOOST_HANA_NAMESPACE_END
51 #endif // !BOOST_HANA_FWD_EMPTY_HPP