[LLVMbugs] [Bug 22935] Compilation failure when using libc++
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 17 06:31:19 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22935
Marshall Clow (home) <mclow.lists at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Marshall Clow (home) <mclow.lists at gmail.com> ---
Simpler reproducer:
#include <string>
#include <vector>
template <typename T> struct fooboo { enum { value = false };};
template<> struct fooboo<std::vector<char>::iterator> { enum { value = true };
};
template<> struct fooboo<std::string ::iterator> { enum { value = true };
};
int main() { return 0; }
It turns out that "std::vector<char>::iterator" and "std::string::iterator" are
the same type, and thus you get a multiple definition error.
This is unfortunate, but allowed by the standard. In fact, both could be simply
"char *". (they aren't in libc++, but they could be)
--
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/20150317/b3af06ec/attachment.html>
More information about the llvm-bugs
mailing list