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

clang compiler: error : unknown type name 'not' #1119

Closed
014972304505347 opened this issue Jun 5, 2018 · 5 comments · Fixed by #2259
Closed

clang compiler: error : unknown type name 'not' #1119

014972304505347 opened this issue Jun 5, 2018 · 5 comments · Fixed by #2259
Assignees
Labels
platform: visual studio related to MSVC release item: ⚡ improvement solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@014972304505347
Copy link

014972304505347 commented Jun 5, 2018

I am building json.hpp with a project using the Clang/LLVM toolset in Visual Studio 2017 Community Edition (version 15.7.2)and getting these errors (and then some):

              1>------ Build started: Project: SampleProject, Configuration: Debug Win32 ------
              1>clang-cl.exe : warning : argument unused during compilation: '/ZI' [-Wunused-command-line-argument]
              1>clang-cl.exe : warning : argument unused during compilation: '/Gm' [-Wunused-command-line-argument]
              1>In file included from Source.cpp:2:
              1>C:\Program Files\vcpkg\installed\x86-windows\include\nlohmann\json.hpp(322,66): error : unknown type name 'not'
              1>template<class B> struct negation : std::integral_constant<bool, not B::value> {};
              1>                                                                 ^
              1>C:\Program Files\vcpkg\installed\x86-windows\include\nlohmann\json.hpp(322,80): error : expected class name
              1>template<class B> struct negation : std::integral_constant<bool, not B::value> {};

(and many more errors).

Here is the compiler version:

        C:\Program Files\LLVM\bin>clang-cl.exe --version
        clang version 6.0.0 (tags/RELEASE_600/final)
        Target: x86_64-pc-windows-msvc
        Thread model: posix
        InstalledDir: C:\Program Files\LLVM\bin

I highly suspect this is a compiler issue. I successfully compiled the project when using the Microsoft Visual C++ compiler (MSVC) version 19.14.

@014972304505347
Copy link
Author

For reference, I issued a bug report here.

@nlohmann
Copy link
Owner

nlohmann commented Jun 8, 2018

Thanks for your effort!

@nlohmann nlohmann added platform: visual studio related to MSVC state: help needed the issue needs help to proceed and removed state: help needed the issue needs help to proceed labels Jun 18, 2018
@nlohmann
Copy link
Owner

It's a pity that there has not been any reaction yet.

@stale
Copy link

stale bot commented Jul 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Jul 28, 2018
@stale stale bot closed this as completed Aug 4, 2018
@nlohmann nlohmann removed the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Dec 22, 2018
@nlohmann
Copy link
Owner

To be fixed with #2259.

@nlohmann nlohmann reopened this Jul 11, 2020
@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Jul 11, 2020
@nlohmann nlohmann self-assigned this Jul 11, 2020
@nlohmann nlohmann added this to the Release 3.8.1 milestone Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: visual studio related to MSVC release item: ⚡ improvement solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants