<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 --- - Constructor inheritance on template not working correctly"
href="https://llvm.org/bugs/show_bug.cgi?id=23107">23107</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Constructor inheritance on template not working correctly
</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>Linux
</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++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jbreitbart@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14140" name="attach_14140" title="Minimal test case">attachment 14140</a> <a href="attachment.cgi?id=14140&action=edit" title="Minimal test case">[details]</a></span>
Minimal test case
Hi,
the attached code does not compile with clang trunk (build a few days ago). It
compiles fine with g++ and my understanding is, that it is valid code (but I
may be wrong here). Here is the error message:
$ clang++ -std=c++14 constructor_inh.cpp
constructor_inh.cpp:4:19: error: dependent using declaration resolved to type
without 'typename'
using myBase::a;
^
constructor_inh.cpp:11:19: note: in instantiation of template class 'a<double,
double>' requested here
a<double, double> b;
^
constructor_inh.cpp:8:8: note: target of using declaration
struct a<int, T2> {
^
1 error generated.
If I add a typename to the using declaration the error message changes to
constructor_inh.cpp:4:28: error: target of using declaration conflicts with
declaration already in scope
[...]
$ clang -v
clang version 3.7.0 (trunk 233370)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.1
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Selected multilib: .;@m64</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>