[LLVMbugs] [Bug 23107] New: Constructor inheritance on template not working correctly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 2 07:09:03 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23107
Bug ID: 23107
Summary: Constructor inheritance on template not working
correctly
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: jbreitbart at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14140
--> https://llvm.org/bugs/attachment.cgi?id=14140&action=edit
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
--
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/20150402/246cc1d4/attachment.html>
More information about the llvm-bugs
mailing list