3 Forward declares `boost::hana::then`.
5 @copyright Louis Dionne 2013-2017
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_THEN_HPP
11 #define BOOST_HANA_FWD_THEN_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Sequentially compose two monadic actions, discarding any value
19 //! produced by the first but not its effects.
20 //! @ingroup group-Monad
24 //! The first `Monad` in the monadic composition chain. The result of
25 //! this monad is ignored, but its effects are combined with that of the
29 //! The second `Monad` in the monadic composition chain.
34 //! @include example/then.cpp
35 #ifdef BOOST_HANA_DOXYGEN_INVOKED
36 constexpr auto then = [](auto&& before, auto&& xs) -> decltype(auto) {
37 return tag-dispatched;
40 template <typename M, typename = void>
41 struct then_impl : then_impl<M, when<true>> { };
44 template <typename Before, typename Xs>
45 constexpr decltype(auto) operator()(Before&& before, Xs&& xs) const;
48 constexpr then_t then{};
50 BOOST_HANA_NAMESPACE_END
52 #endif // !BOOST_HANA_FWD_THEN_HPP