]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/hana/fwd/keys.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / hana / fwd / keys.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::keys`.
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_KEYS_HPP
11 #define BOOST_HANA_FWD_KEYS_HPP
12
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
15
16
17 BOOST_HANA_NAMESPACE_BEGIN
18 // Note: This function is documented per datatype/concept only.
19 //! @cond
20 template <typename T, typename = void>
21 struct keys_impl : keys_impl<T, when<true>> { };
22 //! @endcond
23
24 struct keys_t {
25 template <typename Map>
26 constexpr auto operator()(Map&& map) const;
27 };
28
29 constexpr keys_t keys{};
30
31 //! Returns a `Sequence` containing the name of the members of
32 //! the data structure.
33 //! @ingroup group-Struct
34 //!
35 //! Given a `Struct` object, `keys` returns a `Sequence` containing the
36 //! name of all the members of the `Struct`, in the same order as they
37 //! appear in the `accessors` sequence.
38 //!
39 //!
40 //! Example
41 //! -------
42 //! @include example/struct/keys.cpp
43 #ifdef BOOST_HANA_DOXYGEN_INVOKED
44 constexpr auto keys = [](auto&& object) {
45 return implementation_defined;
46 };
47 #endif
48 BOOST_HANA_NAMESPACE_END
49
50 #endif // !BOOST_HANA_FWD_KEYS_HPP