[llvm-bugs] [Bug 42027] New: [Win] LNK2005: bool const std::_Is_integral<bool> already defined
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 26 12:14:37 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: mikhail.strelnikov at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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 at _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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190526/1271ab58/attachment.html>
More information about the llvm-bugs
mailing list