Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!radar!cadillac!dsouza From: dsouza@gwen.cad.mcc.com (Desmond Dsouza) Newsgroups: comp.lang.c++ Subject: Re: Implementing NULL Message-ID: Date: 7 Jun 91 22:09:55 GMT References: <77091@brunix.UUCP> Sender: news@cadillac.CAD.MCC.COM Organization: MCC CAD Program, Austin, Texas Lines: 28 In-reply-to: sdm@cs.brown.edu's message of 30 May 91 14:04:00 GMT In article <77091@brunix.UUCP> sdm@cs.brown.edu (Scott Meyers) writes: > So here's my latest thought, but since I don't have a compiler supporting > templates, I don't know if it will work: > class NullClass { > public: > template operator T*() const { return 0; } > }; > extern NullClass NULL; > Scott Nice idea, but: ARM, p 342: A template declaration can only appear as a global declaration -- Desmond. -- ------------------------------------------------------------------------------- Desmond D'Souza, MCC CAD Program | ARPA: dsouza@mcc.com | Phone: [512] 338-3324 Box 200195, Austin, TX 78720 | UUCP: {uunet,harvard,gatech,pyramid}!cs.utexas.edu!milano!cadillac!dsouza