<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 failed to look up base class template member functions brought in scope via using"
href="https://llvm.org/bugs/show_bug.cgi?id=25074">25074</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang failed to look up base class template member functions brought in scope via using
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Solaris
</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>hui.li@me.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>#include <type_traits>
#include <iostream>
template < typename >
struct base
{
template < typename T >
typename std::enable_if<std::is_integral<T>::value>::type
foo(T)
{
std::cout << "base::foo" << std::endl;
}
};
struct derived
: base<int>
{
using base<int>::foo;
template < typename T >
typename std::enable_if<not std::is_integral<T>::value>::type
foo(T)
{
std::cout << "derived::foo" << std::endl;
}
};
int main()
{
derived d;
d.foo(0);
}
Compile error from clang3.5:
t.cpp:31:6: error: no matching member function for call to 'foo'
d.foo(0);
~~^~~
t.cpp:21:28: note: candidate template ignored: disabled by 'enable_if' [with T
= int]
typename std::enable_if<not std::is_integral<T>::value>::type
^
1 error generated.
lih@apxdevbal827[~] (1040)$
/opt/ci1/toolchain/tc10b/sles11sp2_gcc-4.8.3_x86-64/llvm-3.5.0/bin/clang++
-std=c++14 -I
/opt/ci1/toolchain/tc10b/sles11sp2_gcc-4.8.3_x86-64/gcc-4.8.3/include/c++/4.8.3/
t.cpp
t.cpp:31:6: error: no matching member function for call to 'foo'
d.foo(0);
~~^~~
t.cpp:21:28: note: candidate template ignored: disabled by 'enable_if' [with T
= int]
typename std::enable_if<not std::is_integral<T>::value>::type
^
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>