<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 - [Win] LNK2005: bool const std::_Is_integral<bool> already defined"
   href="https://bugs.llvm.org/show_bug.cgi?id=42027">42027</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Win] LNK2005: bool const std::_Is_integral<bool> already defined
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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++14
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mikhail.strelnikov@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Self-hosting on Windows
(<a href="https://github.com/llvm/llvm-project/blob/master/llvm/utils/release/build_llvm_package.bat">https://github.com/llvm/llvm-project/blob/master/llvm/utils/release/build_llvm_package.bat</a>)
is broken by this commit:

<a href="https://github.com/llvm-mirror/clang/commit/4241f674da3531d69abc759d727fb0ae7b31535e">https://github.com/llvm-mirror/clang/commit/4241f674da3531d69abc759d727fb0ae7b31535e</a>

Another way to reproduce the bug:

// h.hpp
#pragma once

template<typename T>
constexpr bool v = false;

template <>
constexpr bool v<bool> = true;

// unit1.cpp
#include "h.hpp"

// unit2.cpp
#include "h.hpp"

int main()
{
        return v<bool>;
}

# clang++ -std=c++14 unit1.cpp unit2.cpp
error LNK2005: "bool const v<bool>" (??$v@_N@@3_NB) already defined

I've no idea if it is OK code for C++14, but this is what MS STL does in its
<xtr1common> header.</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>