flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[C++] Add static reflection / stringification for enums (#6499)

Open ajrh1 opened this issue 1 year ago • 2 comments

Add an EnumTraits<T> class, templated on the enum type, largely as proposed in #6499, except in the generated namespace.

Add overloaded EnumValTraits(T) to return the traits class via ADL.

Add GetEnumName(T t) helper for the common case of finding the enum string name from its value.

Changed the cpp17 test and expected test output for stringified enums.

ajrh1 avatar Oct 27 '24 19:10 ajrh1

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Oct 27 '24 19:10 google-cla[bot]

Hi @dbaileychess @aardappel ... I wonder this seems to be stuck. Woukd you know is there anything missing to get this reviewed?

ajrh1 avatar Mar 15 '25 09:03 ajrh1

This pull request is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar Sep 16 '25 20:09 github-actions[bot]

This pull request was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Sep 30 '25 20:09 github-actions[bot]