You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/11 23:53:55 UTC
[GitHub] [arrow] bkietz commented on pull request #10691: ARROW-13296: [C++] Provide a reflection compatible enum replacement
bkietz commented on pull request #10691:
URL: https://github.com/apache/arrow/pull/10691#issuecomment-877881536
I recommend avoiding macros whenever possible, but for completeness I'll note that we could replace
```c++
// color.h
struct Color : EnumType<Color> {
using EnumType::EnumType;
static constexpr const char* kValues = R"(red green blue)";
};
// color.cc
constexpr const char* Color::kValues;
```
with
```c++
ARROW_ENUM(Color, red green blue);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org