#ifndef BOOST_DESCRIBE_DESCRIPTOR_BY_NAME_HPP_INCLUDED #define BOOST_DESCRIBE_DESCRIPTOR_BY_NAME_HPP_INCLUDED // Copyright 2021 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include #include #if defined(BOOST_DESCRIBE_CXX14) #include #include #include namespace boost { namespace describe { namespace detail { template using match_by_name = mp11::mp_bool; #define BOOST_DESCRIBE_MAKE_NAME_IMPL2(s, k) struct _boost_name_##s##_##k { static constexpr char const * name() { return #s; } } #define BOOST_DESCRIBE_MAKE_NAME_IMPL(s, k) BOOST_DESCRIBE_MAKE_NAME_IMPL2(s, k) } // namespace detail #define BOOST_DESCRIBE_MAKE_NAME(s) BOOST_DESCRIBE_MAKE_NAME_IMPL(s, __LINE__) template using descriptor_by_name = mp11::mp_at>>; } // namespace describe } // namespace boost #endif // defined(BOOST_DESCRIBE_CXX14) #endif // #ifndef BOOST_DESCRIBE_DESCRIPTOR_BY_NAME_HPP_INCLUDED