<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang-cl fails to compile atlctrlw.h header from WTL (delayed template instantiation)"
href="https://llvm.org/bugs/show_bug.cgi?id=26748">26748</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl fails to compile atlctrlw.h header from WTL (delayed template instantiation)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andreybokhanko@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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
(<a href="https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l995">https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l995</a>):
ATLTRY(s_pmapMsgHook = new CMsgHookMap);
"CMsgHookMap" is declared in a base class
(<a href="https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l144">https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Include/atlctrlw.h#l144</a>):
typedef ATL::CSimpleMap<DWORD, _MsgHookData*> CMsgHookMap;
Yours,
Andrey
=====
Software Engineer
Intel Compiler Team</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>