boostorg / boostorg/describe

Add support for custom class/struct member names

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
78
Forks
50
PR merge metrics
No merged PRs in 30d

Description

I suggest adding support for custom class/struct member names to the library.
Like this example:

```c++
#include
#include

struct my_struct
{
int a;
float b;
char c;
};

BOOST_DESCRIBE_STRUCT(
my_struct, (), (
(a, "a_name"),
(b, "b_name"),
(c)
)
)

int main()
{
boost::mp11::mp_for_each<
boost::describe::describe_members
>([&](auto D){
std::cout << D.name << std::endl;
});

// Output:
// a_name
// b_name
// c

return 0;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.