This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21601] New: Friend of template argument constructor
- From: "charles dot gretton at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2005 01:33:31 -0000
- Subject: [Bug c++/21601] New: Friend of template argument constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If we try and make \class{A} inherit from \class{B<A>} which is
friends with A's constructor, the compiler segfaults.
template<typename T>
class B
{
public:
friend T::T(B&);
// void some()
// {
// T t = T::T(*this);
// }
};
class A : public B<A>
{
public:
A(B<A>& b);
};
A::A(B<A>& b)
:B<A>(b)
{
}
--
Summary: Friend of template argument constructor
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: charles dot gretton at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21601