From: James Undery Newsgroups: comp.os.msdos.djgpp Subject: Re: ld 2.8.1 does not remove duplicate template instantiations Date: Fri, 17 Apr 1998 01:43:33 +0100 Organization: None unless you want to pay me Message-ID: References: <6h5tcg$p9$1 AT rosenews DOT rose DOT hp DOT com> Reply-To: james AT ghoti DOT demon DOT co DOT uk NNTP-Posting-Host: ghoti.demon.co.uk MIME-Version: 1.0 Lines: 43 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Paul Derbyshire writes >Andrew Crabtree wrote in message <6h5tcg$p9$1 AT rosenews DOT rose DOT hp DOT com>... > >>What was suspicious about it? Nobody has ever tried using the borland style >>template >>removal because it was never advertised as working. > >Huh? >Info gcc, then look at C++ extensions and then template instantiation. Read >about halfway down, it says ..."code written for the Borland model should work ^^^^^^ >as-is"... with just a slowdown because template instances are recompiled in >each file where they're used. Slightly dubious wording but I would read that as not fully tested but assumed working. > >>I'll take a look at the -fno-implicit-template problem as time permits. I >>suspect you'd get more help if you didn't come off as expecting service and >>support from volunteer projects. > >That isn't what is annoying me. What is annoying me is how certain seemingly >critical features are made available only on certain platforms that are >preferentially treated, and the documentations all either imply or overtly say >otherwise! I don't like being told "If you really want to write software that >uses ropes of chars in two different source files, you and everyone who might >want to use this software has to throw away DOS, Windows, and the entire >installed base for these platforms and get Linux or FreeBSD. Or shell out the >$$$ for a Microsoft product that won't be able to write portable code, or even >DOS code, and will mean that ONLY users with DOS, WIndows, etc can use your >software. And you sure as heck can't write code that will be compilable and >runnable on both DOS and Linux unless you keep your rope to one >sourcefile only." You don't have to keep your all your X in a single sourcefile. An quick and very dirty workaround is to compile a single file that #includes all the separate sourcefiles that use templates. (I've never thought of a reason for #including source code files before.) A more elegant solution would be to fix template support yourself and submit your patch ;). -- James Undery