#ifndef BOOST_DESCRIBE_DETAIL_BASES_HPP_INCLUDED #define BOOST_DESCRIBE_DETAIL_BASES_HPP_INCLUDED // Copyright 2020 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include #include #include #include namespace boost { namespace describe { namespace detail { // base_descriptor template struct base_descriptor { static_assert( std::is_base_of::value, "A type listed as a base is not one" ); using type = B; static constexpr unsigned modifiers = compute_base_modifiers(); }; #ifndef __cpp_inline_variables template constexpr unsigned base_descriptor::modifiers; #endif // bases_descriptor template struct bases_descriptor_impl; template struct bases_descriptor_impl> { using type = list...>; }; #define BOOST_DESCRIBE_BASES(C, ...) inline auto boost_base_descriptor_fn( C** ) \ { return typename boost::describe::detail::bases_descriptor_impl>::type(); } } // namespace detail } // namespace describe } // namespace boost #endif // #ifndef BOOST_DESCRIBE_DETAIL_BASES_HPP_INCLUDED