🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1093

Re: Problem with friendly templates

#1093
From: Adin Hunter Baber
Date: Tue, 20 Nov 2001 23:06
34 lines
2521 bytes
Thanks for the info everyone.  i was rather suspicious that the problem 
with friendly templates was a CW error.

As for not posting code, I just really wanted to see if the whole thing 
was a CW error or not.  Sorry about not making the question clear.

The stuff I am working on (with what little free time I have) are some 
smart pointers that support polymorphism.  I think my design is pretty 
much laid down, I am just at a phase where I am verifying my assumptions.

Ironically, CW's error may have helped the design.  By putting operators 
==, !=, and bool into a base class, I don't have to worry about two 
different (incompatible) pointers being compared, and getting a true 
result.

Ex:
SmartPointer<int> ip = etc
SmartPointer<SomeClass> scp = etc

if(ip == scp)
// will return true since both types are converted to bools, 
// and then compared

by putting operator ==, != into a base class, I mostly avoid the problem
if(ip == scp)
// will automatically convert both types to the smart base class
// and see if they really point to the same place.  Thus we get
// correct results.

-- 
Adin Hunter Baber
"Death is lighter than a feather, Duty heavier than a mountain"
"...nevertheless, they fought on even though their homes were piles of ashes,
even though they knew they could not win they still fought on,..."
Technical Details
Message-ID: <mjolnir_DELETE_-6051DC.17061320112001@east.usenetserver.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!cyclone-atl1!newsfeeds-atl1.usenetserver.com!atlpnn01.usenetserver.com.POSTED!mjolnir_DELETE_
References: <mjolnir_DELETE_-279068.14135819112001@east.usenetserver.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,45060c4a2ff696d4
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,45060c4a2ff696d4
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2001-11-20 15:06:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!cyclone-atl1!newsfeeds-atl1.usenetserver.com!atlpnn01.usenetserver.com.POSTED!mjolnir_DELETE_
From: Adin Hunter Baber <mjolnir_DELETE_@soltec.net>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: Problem with friendly templates
Organization: Soltec
References: <mjolnir_DELETE_-279068.14135819112001@east.usenetserver.com>
User-Agent: MT-NewsWatcher/3.1 (PPC)
Message-ID: <mjolnir_DELETE_-6051DC.17061320112001@east.usenetserver.com>
Lines: 34
X-Complaints-To: abuse@usenetserver.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
NNTP-Posting-Date: Tue, 20 Nov 2001 18:00:00 EST
Date: Tue, 20 Nov 2001 17:06:30 -0600