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

user-defined literal operator not found #750

Closed
vsakharuk opened this issue Sep 20, 2017 · 6 comments
Closed

user-defined literal operator not found #750

vsakharuk opened this issue Sep 20, 2017 · 6 comments
Labels
platform: icc related to Intel compiler solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@vsakharuk
Copy link

vsakharuk commented Sep 20, 2017

I am getting this error with json 2.1.1

using precompiled header file ".../test/cotire/json_unit_CXX_prefix.pchi"
.../test/src/unit-deserialization.cpp(82): error: user-defined literal operator not found
CHECK("["foo",1,2,3,false,{"one":1}]"_json == json({"foo", 1, 2, 3, false, {{"one", 1}}}))

I see literal operator in json.hpp
I suspect this is due to pre-compiled headers for icc16.

How do I disable usage of those for icc in cmake?

Edit:
I flipped in test files
#include <json.hpp>
#include <catch.hpp>
and it compiles, issue clearly is pre-compiled headers.
Is there a switch to disable it or editing those the only way to do it?

Of note,
I notice at least one test file uses #define private public
so it may not be a good idea to use pre-compiled headers at all.

@theodelrieu
Copy link
Contributor

I had this issue too, had to run ninja clean each time, but I believe it has been removed on the develop branch.

@nlohmann
Copy link
Owner

@vsakharuk Does this issue also occur with the version in develop?

@nlohmann nlohmann added the state: please discuss please discuss the issue or vote for your favorite option label Sep 23, 2017
@nlohmann
Copy link
Owner

Any news here?

@nlohmann nlohmann added the platform: icc related to Intel compiler label Sep 29, 2017
@vsakharuk
Copy link
Author

Sorry, missed you post. Will try.

@vsakharuk
Copy link
Author

I tried with develop, it is working.

@nlohmann
Copy link
Owner

Thanks for checking back!

@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation and removed state: please discuss please discuss the issue or vote for your favorite option labels Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: icc related to Intel compiler solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

3 participants