https://bugs.llvm.org/show_bug.cgi?id=42027
Bug ID: 42027
Summary: [Win] LNK2005: bool const std::_Is_integral<bool>
already defined
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Self-hosting on Windows
(https://github.com/llvm/llvm-project/blob/master/llvm/utils/release/build_llvm_package.bat)
is broken by this commit:
https://github.com/llvm-mirror/clang/commit/4241f674da3531d69abc759d727fb0ae7b31535e
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs