<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [clang] error : unknown type name 'not'"
   href="https://bugs.llvm.org/show_bug.cgi?id=37700">37700</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[clang] error : unknown type name 'not'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>danchen@infinera.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Overview: I am building with the json.hpp file (from "JSON for Modern C++"
library by nlohmann) with a Visual C++ project using the Clang/LLVM toolset in
Visual Studio 2017 (version 15.7.2)and getting these errors in the json.hpp
file (and then some).

Steps to reproduce: (You can try the attached Visual Studio project).
   1.Create a new Visual Studio Solution in VS2017 and add a source file to it.
   2.Put in the following code:

#include <nlohmann/json.hpp>

int main() {

}


   3. Set the toolset to "LLVM-vs2014" under Configuration Properties>General
(you have to right-click the project and click "Properties" to get to this
page).
   4. I set these variables like so (telling Clang to use the vcpkg libraries)
-- (right-click the project and select "Properties", then go to Configuration
Properties>VC++ Directories to find these):
           "Include Directories" variable to also have 
              "C:\Program Files\vcpkg\installed\x86-windows\include".


           "Library Directories" variable to also have 
              "C:\Program Files\vcpkg\installed\x86-windows\lib"

   5. Build.

Actual results: Bugs like so


                  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> {};

Expected Results: Successful build.


Build Date and Hardware:
     Windows 10, x64 bit
     Visual Studio 2017 (version 15.7.2)
     LLVM-vs2014 toolset
     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

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

Additional Information: See attached Visual Studio Project.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>