]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/include/boost/hana/fwd/cartesian_product.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / cartesian_product.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Forward declares `boost::hana::cartesian_product`.
4
5@copyright Louis Dionne 2013-2016
6Distributed 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_CARTESIAN_PRODUCT_HPP
11#define BOOST_HANA_FWD_CARTESIAN_PRODUCT_HPP
12
13#include <boost/hana/config.hpp>
14#include <boost/hana/core/when.hpp>
15
16
17BOOST_HANA_NAMESPACE_BEGIN
18 //! Computes the cartesian product of a sequence of sequences.
19 //! @ingroup group-Sequence
20 //!
21 //! Given a sequence of sequences, `cartesian_product` returns a new
22 //! sequence of sequences containing the cartesian product of the
23 //! original sequences. For this method to finish, a finite number
24 //! of finite sequences must be provided.
25 //!
26 //! @note
27 //! All the sequences must have the same tag, and that tag must also match
28 //! that of the top-level sequence.
29 //!
30 //!
31 //! Signature
32 //! ---------
33 //! Given a `Sequence` `S(T)`, the signature is
34 //! \f[
35 //! \mathtt{cartesian\_product} : S(S(T)) \to S(S(T))
36 //! \f]
37 //!
38 //! @param xs
39 //! A sequence of sequences of which the cartesian product is computed.
40 //!
41 //!
42 //! Example
43 //! -------
44 //! @include example/cartesian_product.cpp
45#ifdef BOOST_HANA_DOXYGEN_INVOKED
46 constexpr auto cartesian_product = [](auto&& xs) {
47 return tag-dispatched;
48 };
49#else
50 template <typename S, typename = void>
51 struct cartesian_product_impl : cartesian_product_impl<S, when<true>> { };
52
53 struct cartesian_product_t {
54 template <typename Xs>
55 constexpr auto operator()(Xs&& xs) const;
56 };
57
58 constexpr cartesian_product_t cartesian_product{};
59#endif
60BOOST_HANA_NAMESPACE_END
61
62#endif // !BOOST_HANA_FWD_CARTESIAN_PRODUCT_HPP