[llvm-bugs] [Bug 26748] New: clang-cl fails to compile atlctrlw.h header from WTL (delayed template instantiation)
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 26 05:23:41 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26748
Bug ID: 26748
Summary: clang-cl fails to compile atlctrlw.h header from WTL
(delayed template instantiation)
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: andreybokhanko at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
A simple reproducer:
class CCommandBarCtrlBase {
public:
typedef int CMsgHookMap;
};
template <class T>
class CCommandBarCtrlImpl : public T {
public:
void foo() {
void *p = new CMsgHookMap; // "new typename T::CMsgHookMap" works fine
}
};
void bar() {
CCommandBarCtrlImpl<CCommandBarCtrlBase> x;
x.foo();
}
$ clang-cl H:/test.cpp -c
H:/test.cpp(10,19) : error: unknown type name 'CMsgHookMap'
void *p = new CMsgHookMap; // "new typename T::CMsgHookMap" works fine
^
1 error generated.
This construct is used in atlctrlw.h header
(https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l995):
ATLTRY(s_pmapMsgHook = new CMsgHookMap);
"CMsgHookMap" is declared in a base class
(https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l144):
typedef ATL::CSimpleMap<DWORD, _MsgHookData*> CMsgHookMap;
Yours,
Andrey
=====
Software Engineer
Intel Compiler Team
--
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/20160226/d03b9c7d/attachment.html>
More information about the llvm-bugs
mailing list