Skip to content
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

C++17-friendly ? #335

Closed
Alexandre-Dhalenne opened this issue Sep 20, 2021 · 4 comments
Closed

C++17-friendly ? #335

Alexandre-Dhalenne opened this issue Sep 20, 2021 · 4 comments

Comments

@Alexandre-Dhalenne
Copy link

Would it be possible to make this library compliant with C++17 ? I'm getting a lot of

[...]/jsoncons-0.167.1/include/jsoncons_ext/cbor/cbor_detail.hpp:29:42: error: binary constants are a C++14 feature or GCC extension [-Werror]
 const uint8_t cbor_array_tags_010_mask = 0b11100000;

And as in my current project I'm treating warning as errors I can not use the latest version of jsoncons.

Thanks,

@danielaparker
Copy link
Owner

Thanks for pointing that out, the 0b... notation used is only valid with C++14 and later. I would expect that to be valid if compiling with C++17, though. In practice many C++11 compilers also support it, which is why we missed it in unit tests, even with warnings treated as errors.

We'll change it to hexadecimal notation in the next release, which should be soon.

@Alexandre-Dhalenne
Copy link
Author

Great !
Again, thanks a lot for your library and fast support.
Have a great day,

@danielaparker
Copy link
Owner

The candidate release is currently on master, which should fix the issue you reported.

@danielaparker
Copy link
Owner

Fixed in 0.168.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants