3 Forward declares `boost::hana::lift`.
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_LIFT_HPP
11 #define BOOST_HANA_FWD_LIFT_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 namespace boost { namespace hana {
18 //! Lift a value into an `Applicative` structure.
19 //! @ingroup group-Applicative
21 //! `lift<A>` takes a normal value and embeds it into a structure whose
22 //! shape is represented by the `A` `Applicative`. Note that the value
23 //! may be a function, in which case the created structure may be
24 //! `ap`plied to another `Applicative` structure containing values.
29 //! Given an Applicative `A`, the signature is
30 //! @f$ \mathtt{lift}_A : T \to A(T) @f$.
33 //! A tag representing the `Applicative` into which the value is lifted.
36 //! The value to lift into the applicative.
41 //! @include example/lift.cpp
42 #ifdef BOOST_HANA_DOXYGEN_INVOKED
44 constexpr auto lift = [](auto&& x) {
45 return tag-dispatched;
48 template <typename A, typename = void>
49 struct lift_impl : lift_impl<A, when<true>> { };
54 constexpr auto operator()(X&& x) const;
58 BOOST_HANA_INLINE_VARIABLE constexpr lift_t<A> lift{};
60 }} // end namespace boost::hana
62 #endif // !BOOST_HANA_FWD_LIFT_HPP