-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
type conversion failing with clang ext_vector_type #2436
Comments
I can confirm your observations, but I have no idea why it does not work or how to fix it. |
Thanks for the quick reply! |
Hello |
Hey @colormotor I am still digging into this, now that I am finally on holidays. I think it has to do with argument-dependent lookup and this design that the library uses. I think I managed to simplify a bit what is happening in the library in this compile explorer link: https://godbolt.org/z/xrY469 please play around with it I will try to ask someone who is a compiler guru. The error reads something like
As a better workaround is to encapsulate the
I also don't think it has to do with the attribute fields. If you just specify I will keep digging and I will keep you posted |
@tete17 Thanks! I just did a quick test and the workaround works for me. |
Anything left to do to close this issue? |
Can be closed as far as I am concerned, thx. |
Hi, I would like to serialize a vector type defined using clang's
ext_vector_type
extension,but this results in the errors reported below.
I am posting this as a bug, but I am not sure there is a viable workaround, so hope it is ok.
Thanks in advance,
Daniel
What is the issue you have?
I specify the
to_json
andfrom_json
functions for a vector type defined asBut the type is not recognized by the library and this results in compilation errors.
Explicitly calling
to_json
andfrom_json
works.Defining the type as a
struct
also works as expected.Please describe the steps to reproduce the issue.
Here is a minimal example that reproduces the error. I commented different lines that also produce similar errors.
Can you provide a small but working code example?
See above.
What is the expected behavior?
I would expect the definitions of
to_json
andfrom_json
to result in a successful compilation of the code.And what is the actual behavior instead?
Using
ext_vector_type
results in the following errors:The reverse procedure (converting to json) also produces this error:
Which compiler and operating system are you using?
I am using Apple clang version 11.0.0, on OSX Mojave.
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: