Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:13:42

0001 /*!
0002 @file
0003 Documents the `BOOST_HANA_ADAPT_STRUCT` macro.
0004 
0005 Copyright Louis Dionne 2013-2022
0006 Distributed under the Boost Software License, Version 1.0.
0007 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
0008  */
0009 
0010 #ifndef BOOST_HANA_FWD_ADAPT_STRUCT_HPP
0011 #define BOOST_HANA_FWD_ADAPT_STRUCT_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 
0015 
0016 namespace boost { namespace hana {
0017     // Note:
0018     // The weird definition as a variable seems to exploit a glitch in Doxygen
0019     // which makes the macro appear in the related objects of Struct (as we
0020     // want it to).
0021 
0022     //! Defines a model of `Struct` with the given members.
0023     //! @ingroup group-Struct
0024     //!
0025     //! Using this macro at _global scope_ will define a model of the `Struct`
0026     //! concept for the given type. This can be used to easily adapt existing
0027     //! user-defined types in a ad-hoc manner. Unlike the
0028     //! `BOOST_HANA_DEFINE_STRUCT` macro, this macro does not
0029     //! require the types of the members to be specified.
0030     //!
0031     //! @note
0032     //! This macro only works if the tag of the user-defined type `T` is `T`
0033     //! itself. This is the case unless you specifically asked for something
0034     //! different; see `tag_of`'s documentation.
0035     //!
0036     //!
0037     //! Example
0038     //! -------
0039     //! @include example/adapt_struct.cpp
0040 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0041     auto BOOST_HANA_ADAPT_STRUCT(...) = ;
0042     #define BOOST_HANA_ADAPT_STRUCT(Name, ...) see documentation
0043 #else
0044     // defined in <boost/hana/adapt_struct.hpp>
0045 #endif
0046 }} // end namespace boost::hana
0047 
0048 #endif // !BOOST_HANA_FWD_ADAPT_STRUCT_HPP