]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/include/boost/hana/fwd/empty.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / empty.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::empty`.
4
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)
8 */
9
10 #ifndef BOOST_HANA_FWD_EMPTY_HPP
11 #define BOOST_HANA_FWD_EMPTY_HPP
12
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
15
16
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Identity of the monadic combination `concat`.
19 //! @ingroup group-MonadPlus
20 //!
21 //! Signature
22 //! ---------
23 //! Given a MonadPlus `M`, the signature is
24 //! @f$ \mathtt{empty}_M : \emptyset \to M(T) @f$.
25 //!
26 //! @tparam M
27 //! The tag of the monadic structure to return. This must be
28 //! a model of the MonadPlus concept.
29 //!
30 //!
31 //! Example
32 //! -------
33 //! @include example/empty.cpp
34 #ifdef BOOST_HANA_DOXYGEN_INVOKED
35 template <typename M>
36 constexpr auto empty = []() {
37 return tag-dispatched;
38 };
39 #else
40 template <typename M, typename = void>
41 struct empty_impl : empty_impl<M, when<true>> { };
42
43 template <typename M>
44 struct empty_t;
45
46 template <typename M>
47 constexpr empty_t<M> empty{};
48 #endif
49 BOOST_HANA_NAMESPACE_END
50
51 #endif // !BOOST_HANA_FWD_EMPTY_HPP