3 Forward declares `boost::hana::members`.
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_MEMBERS_HPP
11 #define BOOST_HANA_FWD_MEMBERS_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns a `Sequence` containing the members of a `Struct`.
19 //! @ingroup group-Struct
21 //! Given a `Struct` object, `members` returns a `Sequence` containing
22 //! all the members of the `Struct`, in the same order as their respective
23 //! accessor appears in the `accessors` sequence.
28 //! @include example/members.cpp
29 #ifdef BOOST_HANA_DOXYGEN_INVOKED
30 constexpr auto members = [](auto&& object) {
31 return tag-dispatched;
34 template <typename S, typename = void>
35 struct members_impl : members_impl<S, when<true>> { };
38 template <typename Object>
39 constexpr auto operator()(Object&& object) const;
42 constexpr members_t members{};
44 BOOST_HANA_NAMESPACE_END
46 #endif // !BOOST_HANA_FWD_MEMBERS_HPP