3 Documents the `BOOST_HANA_ADAPT_ADT` macro.
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_ADAPT_ADT_HPP
11 #define BOOST_HANA_FWD_ADAPT_ADT_HPP
13 #include <boost/hana/config.hpp>
16 namespace boost { namespace hana {
18 // The weird definition as a variable seems to exploit a glitch in Doxygen
19 // which makes the macro appear in the related objects of Struct (as we
22 //! Defines a model of `Struct` with the given accessors.
23 //! @ingroup group-Struct
25 //! Using this macro at _global scope_ will define a model of the `Struct`
26 //! concept for the given type. This can be used to easily adapt existing
27 //! user-defined types in a ad-hoc manner. Unlike `BOOST_HANA_ADAPT_STRUCT`,
28 //! this macro requires specifying the way to retrieve each member by
29 //! providing a function that does the extraction.
32 //! This macro only works if the tag of the user-defined type `T` is `T`
33 //! itself. This is the case unless you specifically asked for something
34 //! different; see `tag_of`'s documentation.
39 //! @include example/adapt_adt.cpp
40 #ifdef BOOST_HANA_DOXYGEN_INVOKED
41 auto BOOST_HANA_ADAPT_ADT(...) = ;
42 #define BOOST_HANA_ADAPT_ADT(Name, ...) see documentation
44 // defined in <boost/hana/adapt_adt.hpp>
46 }} // end namespace boost::hana
48 #endif // !BOOST_HANA_FWD_ADAPT_ADT_HPP