Article View: gnu.g++.bug
Article #902function overload "bug?"
From: Dov Kruger
Date: Fri, 04 Sep 1992 08:25
Date: Fri, 04 Sep 1992 08:25
23 lines
945 bytes
945 bytes
Let's just say that g++ works differently than cxx (DEC's implementation)
and that it does not make sense to me. Given the following code:
class Link1 {
Link1* _next;
public:
void next(Link1* new_next);
};
You can pass the integer constant 0 to the function, which is correct.
Link1 x;
x.next(0); // this works!
However, you can't declare an integer constant of zero, as has been my habit:
const int nil = 0;
x.next(nil);
It doesn't work.
Thanks,
Dov Kruger
Technical Details
Message-ID:
<9209041625.AA01647@ds20.dmi.stevens-tech.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ds20.dmi.stevens-tech.edu!dovShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ds20.dmi.stevens-tech.edu!dov From: dov@ds20.dmi.stevens-tech.edu (Dov Kruger) Subject: function overload "bug?" Message-ID: <9209041625.AA01647@ds20.dmi.stevens-tech.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 4 Sep 1992 08:25:37 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 24