[LLVMbugs] [Bug 7094] New: Warns "this partial specialization will never be used", but still (correctly) uses it.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 7 13:01:04 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7094
Summary: Warns "this partial specialization will never be
used", but still (correctly) uses it.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: schaub-johannes at web.de
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Clang wrongfully warns about the following "check" partial specialization
// cut
struct X {
template <typename T>
struct Y { };
};
template <typename T1, typename T2, typename = void>
struct A { };
template<typename X>
struct hasit {
template<typename T>
struct check { };
/* notice: X is known here, doesn't need deduction! */
template<typename T>
struct check< typename X::template Y<T> > {
typedef void does;
typedef T arg1_type;
};
};
template<typename X, typename T>
struct A< X, T, typename hasit<X>::template check<T>::does > {
typedef int Type;
};
A<X, X::Y<int> >::Type t;
// cut
It compiles and links fine.
--
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.
More information about the llvm-bugs
mailing list