Skip to content

user-defined literal operator not found #750

Description

@vsakharuk

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: iccrelated to Intel compilersolution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions