Skip to content

Fix gcc 12 compiling error #312

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

sjanel
Copy link
Contributor

@sjanel sjanel commented Oct 27, 2023

With gcc 12, jwt-cpp does not compile:

[build] include/jwt-cpp/base.h: In static member function ‘static const std::initializer_list<std::__cxx11::basic_string<char> >& jwt::alphabet::helper::base64url_percent_encoding::fill()’:
[build] include/jwt-cpp/base.h:86:100: error: ‘(((const std::__cxx11::basic_string<char>*)(& <temporary>)) != 0)’ is not a constant expression
[build]    86 |                                         static std::initializer_list<std::string> fill{"%3D", "%3d"};

However my other PR fixes the issue much more properly.

@prince-chrismc prince-chrismc linked an issue Nov 26, 2023 that may be closed by this pull request
1 task
this is to avoid breaking the API down the line
these do get updated with with under active development and there are changes which could affect us
@prince-chrismc prince-chrismc merged commit 0e3d6a1 into Thalhammer:master Nov 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

c++20 undefined behavior usage
2 participants