Article View: gnu.g++.bug
Article #20(none)
From: Werner Benger
Date: Thu, 29 Oct 1992 21:34
Date: Thu, 29 Oct 1992 21:34
35 lines
805 bytes
805 bytes
There seems to be an error in gcc 2.2.2. It is not possible to
compile the following program if "X::Y operator()(int,int)" is
defined outside of the class X.
Werner (werner@ast1.uibk.ac.at)
struct X
{
struct Y
{
Y() {}
};
X::Y operator()(int x,int y);
/*
{
X::Y Z;
return Z;
}
*/
};
X::Y X::operator()(int x,int y)
{
X::Y Z;
return Z;
}
main()
{
X a;
X::Y b=a(0,0);
}
Technical Details
Message-ID:
<9210291934.AA21907@ast1.uibk.ac.at>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ast1.uibk.ac.at!wernerShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ast1.uibk.ac.at!werner From: werner@ast1.uibk.ac.at ( Werner Benger ) Subject: (none) Message-ID: <9210291934.AA21907@ast1.uibk.ac.at> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 29 Oct 1992 21:34:08 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 37