-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to get "define" for enum type #231
Comments
An alternate way to do this with the existing version can be {{asType label}} = static_cast<{{as_delimited_macro name}}>(v); |
it does not work as expected if using {{asType label}} = static_cast<{{as_delimited_macro name}}>(v), which returns c = static_cast(v); |
Could you give me the example template on how you are using this? |
I'm a bit confused with this, @yunhanw-google :
instead of:
|
If I define this way, how can I check SimpleEnum is enum type? {{#if (isEnum type) }} i need to write this kind of code |
|
another alternative is that, we add one additional flag, isEnum similar to isArray for struct item(#229) |
There is this helper which may be helpful. Regarding "static_cast<{{as_delimited_macro name}}>(v), which returns c = static_cast(v);" I am not sure why this happened. Is this for a particular struct item or all of them? |
Just tried, it cannot detect SimpleEnum is enum. |
So if I do this, does this meet your meeds: |
Closed in PR 235 |
looks like currently zap don't support struct item with define ?
for enum type, we would like to get "define"
then I can write {{asType label}} = static_cast<{{define}}>(v);
The text was updated successfully, but these errors were encountered: