http://llvm.org/bugs/show_bug.cgi?id=7388
Summary: Error using _Bool as a template argument
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=5043)
--> (http://llvm.org/bugs/attachment.cgi?id=5043)
The repo code
It seems that _Bool is a predefined type in Clang, yet the following (reduced)
code fails to compile:
#ifndef __clang__
typedef bool _Bool;
#endif
template<class _Iter> struct iterator_traits {
};
template<> struct iterator_traits<_Bool> {
};
Output from "clang -cc1 traits_red1.cpp":
traits_red1.cpp:6:35: error: expected expression
template<> struct iterator_traits<_Bool> {
^
traits_red1.cpp:6:1: error: extraneous 'template<>' in declaration of struct
(null)
template<> struct iterator_traits<_Bool> {
^
traits_red1.cpp:6:12: error: anonymous unions at namespace or global scope must
be declared 'static'
template<> struct iterator_traits<_Bool> {
^
traits_red1.cpp:6:12: error: anonymous structs and classes must be class
members
4 errors generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs