This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14389] Can't define inline overloaded template function members out of their class.
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2004 19:49:11 -0000
- Subject: [Bug c++/14389] Can't define inline overloaded template function members out of their class.
- References: <20040302191442.14389.fasbjx@free.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-03-02 19:49 -------
Confirmed:
--------------------
struct S {
template< typename B, typename A > void foo();
template< typename A > void foo();
};
template< typename A > void S::foo() {}
template< typename B, typename A > void S::foo() {}
template void S::foo<void> ();
template void S::foo<void,void> ();
-------------------------
This fails with 3.3.4, 3.4 and mainline and all other versions I have here:
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
x.cc:18: error: redefinition of `void S::foo()'
x.cc:14: error: `void S::foo()' previously declared here
x.cc:18: error: got 2 template parameters for `void S::foo()'
x.cc:18: error: but 1 required
x.cc:14: internal compiler error: tree check: accessed elt 2 of tree_vec with
1 elts in tsubst, at cp/pt.c:6729
Please submit a full bug report,
The last example also fails, but for the sake of having only one problem
per report I'll submit it in another PR.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |2.95.3 3.2.3 3.3.3 3.4.0
| |3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-03-02 19:49:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14389