]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/hana/fwd/fold.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / hana / fwd / fold.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::fold`.
4
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)
8 */
9
10 #ifndef BOOST_HANA_FWD_FOLD_HPP
11 #define BOOST_HANA_FWD_FOLD_HPP
12
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/fwd/fold_left.hpp>
15
16
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Equivalent to `fold_left`; provided for convenience.
19 //! @ingroup group-Foldable
20 //!
21 //! `fold` is equivalent to `fold_left`. However, it is not tag-dispatched
22 //! on its own because it is just an alias to `fold_left`. Also note that
23 //! `fold` can be called with or without an initial state, just like
24 //! `fold_left`:
25 //!
26 //! @code
27 //! fold(xs, state, f) == fold_left(xs, state, f)
28 //! fold(xs, f) == fold_left(xs, f)
29 //! @endcode
30 //!
31 //!
32 //! Example
33 //! -------
34 //! @include example/fold.cpp
35 constexpr auto fold = fold_left;
36 BOOST_HANA_NAMESPACE_END
37
38 #endif // !BOOST_HANA_FWD_FOLD_HPP