magic_enum icon indicating copy to clipboard operation
magic_enum copied to clipboard

Provide reflection data as compile time lists rather than array

Open Julien-Blanc-tgcm opened this issue 2 years ago • 1 comments

Working with arrays in a compile time context is not the easiest thing. It is much more convenient to work with integer_list. Boost describe ( https://www.boost.org/doc/libs/1_79_0/libs/describe/doc/html/describe.html ) provides also reflection on enums, but uses a slightly different structure:

«

A descriptor list is a type of the form L<D1, D2, …​, Dn>, where L is of the form template<class…​ T> struct L {}; and Di is of the form

struct Di { static constexpr E value; static constexpr char const* name; };

»

It would be nice if we could also get this, in addition to what is currently provided, with magic_enum.

Julien-Blanc-tgcm avatar Jun 29 '22 11:06 Julien-Blanc-tgcm

Oh, I haven't seen this library in boost yet, I'll take a look at it.

Neargye avatar Jun 29 '22 12:06 Neargye