Article View: comp.std.c++
Article #3038Re: An STL helper -- and template and type shenanigans
From: David Byrden
Date: Thu, 18 Jan 1996 09:29
Date: Thu, 18 Jan 1996 09:29
33 lines
1556 bytes
1556 bytes
Allan;. Can't see a way around your problem. Seem to remember the HP STL doing similar things. Why worry, anyway? An optimising compiler will reduce the cost of the bogus parameter to near zero. >> to = from; What happens to the original T objects that 'to' was tracking? >> void deep_copy( Iter fromB, Iter fromE, Iter toB, Iter toE, >> ContainedType* ) The fourth parameter is redundant; the size of the range to be copied is already specified by the first 2 parameters. >> while( (fromB != fromE) && (toB != toE) && *fromB ) Not sure about this. It assumes that 'from' can contain some NULL pointers, but that they are guaranteed to be together in a block at the upper end of it. David Byrden --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4dkmtt$dap@news.bridge.net>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<30FCDA77.69CB@trilogy.com>Show Full Headers
Complete Article Headers
From: David Byrden <100101.2547@compuserve.com> Message-ID: <4dkmtt$dap@news.bridge.net> X-Original-Date: 18 Jan 1996 05:47:41 GMT Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 18 Jan 96 09:29:44 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ Subject: Re: An STL helper -- and template and type shenanigans Organization: self-employed References: <30FCDA77.69CB@trilogy.com> X-Mailer: Mozilla 1.1N (Windows; I; 16bit) X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMP4TK+EDnX0m9pzZAQEv+gF/WyU/x7oS9uCSNlYsBMTcWyK05Q/uqReZ Oxs7TuzZ0IXPTYRyfA0HFZ4HTGG4OKU/ =hytG