<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 frontend doesn't deal with class member function pointer passed as template argument correctly on Windows"
href="https://llvm.org/bugs/show_bug.cgi?id=25661">25661</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang frontend doesn't deal with class member function pointer passed as template argument correctly on Windows
</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++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wanyingloo@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>This seems a regression of Windows targets in Clang 3.5 and it's reproducible
in the trunk.
$ cat test.cpp
template<typename T>
struct is_function
{
static constexpr bool value = false;
};
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
{
static constexpr bool value = true;
};
template<typename>
struct helper {};
template<typename _Tp, typename _Cp>
struct helper<_Tp _Cp::*> : public is_function<_Tp> {};
class class_type {};
static_assert(
helper<void(class_type::*)()>::value
, "void(class_type::*)() IS a member function pointer");
$ clang-3.4/bin/clang -c -std=c++11 -target x86_64-unknown-linux-gnu test.cpp
$ clang-3.4/bin/clang -c -std=c++11 -target i686-pc-mingw32 test.cpp
$ clang-3.5/bin/clang -c -std=c++11 -target x86_64-unknown-linux-gnu test.cpp
$ clang-3.5/bin/clang -c -std=c++11 -target i686-pc-mingw32 test.cpp
test.cpp:19:1: error: static_assert failed "void(class_type::*)() IS a member
function pointer"
static_assert(
^
1 error generated.</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>