From: philh@vision25.demon.co.uk (Phil Hunt)
Subject: Re: GPL and "free" software
Date: 1999/05/02
Date: 1999-05-02T00:00:00+00:00 [thread overview]
Message-ID: <925653268snz@vision25.demon.co.uk> (raw)
In-Reply-To: 372C1824.1417502F@doc.ic.ac.uk
In article <372C1824.1417502F@doc.ic.ac.uk> epa98@doc.ic.ac.uk "Ed Avis" writes:
> Phil Hunt wrote:
> >>Can't you write a template class in C++, and put
> >>it in a dynamically linked library?
> >
> >I would be surprised if this is the case. However instantiations of
> >templates can be put in a DLL or .so.
>
> What do you mean by 'instantiations of templates'?
>
> Surely if I write a class like this (pseudocode, I don't know Ada and
> my C++ is rusty):
>
> class List
> let T be any class
> method add(T)
> method get_first_item : returns T
> method count_items : returns Int
>
> then there will only one copy of the executable code in the object
> file. If the program instantiates a List of Int, then the code for
> List is called and passed pointers (or references) to Ints. If the
> program wants a List of Char, then the same object code can be used,
> being passed pointers to Chars.
>
> Or have I got it horribly wrong?
I think you've got it horribly wrong (there might be C++ compilers
that work like that, but I imagine they are very rare, produce slow code
and are horrible to implement).
What C++ does is constructs code for the template with T changed to
int, compiles it, and produces code for the template with T changed
to char, and compiles that as well.
--
Phil Hunt....philh@vision25.demon.co.uk
next prev parent reply other threads:[~1999-05-02 0:00 UTC|newest]
Thread overview: 162+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-20 0:00 air traffic control software Terry J. Westley
1999-04-21 0:00 ` Kevin Rigotti
1999-04-21 0:00 ` Robert Dewar
1999-04-21 0:00 ` GPL and "free" software (was: air traffic control software) Terry J. Westley
1999-04-21 0:00 ` bill
1999-04-23 0:00 ` Robert Dewar
1999-04-23 0:00 ` Robert Dewar
1999-04-23 0:00 ` Tom Moran
1999-04-24 0:00 ` Florian Weimer
1999-04-25 0:00 ` Robert Dewar
1999-04-26 0:00 ` GPL and "free" software Nick Roberts
1999-04-26 0:00 ` Phil Hunt
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` Ronald Cole
1999-04-26 0:00 ` Robert Dewar
1999-04-26 0:00 ` Florian Weimer
1999-04-26 0:00 ` Tim Smith
1999-04-26 0:00 ` Paul Hughett
1999-04-26 0:00 ` Robert Dewar
1999-04-26 0:00 ` Paul Hughett
1999-04-26 0:00 ` Robert Dewar
1999-04-27 0:00 ` Paul Hughett
1999-04-27 0:00 ` Barry Margolin
1999-04-27 0:00 ` Paul Hughett
1999-04-27 0:00 ` Joshua E. Rodd
[not found] ` <7g5qgg$n7t@www.inetnow.net>
1999-04-28 0:00 ` Joshua E. Rodd
[not found] ` <7g7ro3$q91@www.inetnow.net>
1999-04-28 0:00 ` Joshua E. Rodd
1999-04-28 0:00 ` Lynn Winebarger
1999-04-29 0:00 ` Robert Dewar
[not found] ` <7g8ip8$skl@www.inetnow.net>
1999-04-29 0:00 ` Barry Margolin
1999-04-29 0:00 ` [Offtopic for cl.ada] " Joshua E. Rodd
1999-04-30 0:00 ` Paul Hughett
1999-04-30 0:00 ` Robert Dewar
1999-04-29 0:00 ` Lynn Winebarger
1999-04-29 0:00 ` Aidan Skinner
1999-05-08 0:00 ` dewarr
1999-04-28 0:00 ` Robert Dewar
1999-04-28 0:00 ` Joshua E. Rodd
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` David Starner
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` Lynn Winebarger
1999-04-29 0:00 ` Joshua E. Rodd
1999-04-30 0:00 ` Lynn Winebarger
1999-05-05 0:00 ` Richard E. Hawkins Esq.
1999-05-05 0:00 ` Robert Dewar
1999-05-05 0:00 ` Richard E. Hawkins Esq.
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Barry Margolin
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Barry Margolin
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Barry Margolin
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Roger Espel Llima
1999-05-07 0:00 ` Robert Dewar
1999-05-07 0:00 ` Barry Margolin
1999-05-07 0:00 ` dennison
[not found] ` <7gdv6m$1fid$1@Mercury.mcs.net>
1999-05-03 0:00 ` [O/T 4 cla] " Joshua E. Rodd
[not found] ` <7gkmt5$e8t@www.inetnow.net>
1999-05-03 0:00 ` Joshua E. Rodd
[not found] ` <7gnb7u$hlu@www.inetnow.net>
1999-05-04 0:00 ` Leslie Mikesell
1999-05-05 0:00 ` Robert Dewar
1999-05-05 0:00 ` Leslie Mikesell
1999-05-06 0:00 ` Robert Dewar
1999-05-08 0:00 ` Leslie Mikesell
1999-05-08 0:00 ` Robert Dewar
1999-05-10 0:00 ` Leslie Mikesell
1999-05-11 0:00 ` Robert Dewar
1999-05-10 0:00 ` Leslie Mikesell
1999-05-11 0:00 ` Robert Dewar
1999-05-10 0:00 ` Leslie Mikesell
1999-05-11 0:00 ` Robert Dewar
1999-05-11 0:00 ` Leslie Mikesell
1999-05-12 0:00 ` Robert Dewar
1999-05-04 0:00 ` James Youngman
1999-05-06 0:00 ` Robert Dewar
1999-05-04 0:00 ` James Youngman
1999-05-06 0:00 ` Robert Dewar
1999-05-06 0:00 ` Robert A Duff
1999-05-06 0:00 ` Robert Dewar
1999-05-07 0:00 ` Joshua E. Rodd
1999-05-08 0:00 ` dewarr
1999-05-18 0:00 ` Joshua E. Rodd
1999-04-28 0:00 ` Barry Margolin
1999-04-28 0:00 ` Lynn Winebarger
1999-04-28 0:00 ` Joshua E. Rodd
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` Robert A Duff
1999-04-29 0:00 ` Barry Margolin
1999-04-28 0:00 ` Samuel Mize
1999-04-29 0:00 ` Robert Dewar
1999-04-28 0:00 ` Samuel Mize
1999-04-29 0:00 ` Paul Hughett
1999-04-29 0:00 ` Fraser Wilson
1999-04-29 0:00 ` Ed Avis
1999-04-29 0:00 ` Barry Margolin
1999-04-29 0:00 ` David Starner
1999-04-29 0:00 ` Ed Avis
1999-04-29 0:00 ` Joshua E. Rodd
1999-04-29 0:00 ` David Starner
1999-04-30 0:00 ` Ed Avis
1999-04-30 0:00 ` Barry Margolin
1999-04-30 0:00 ` Ed Avis
[not found] ` <R5qW2.242$jw4.22063@burlma1-snr2>
[not found] ` <372ADEED.D907754@doc.ic.ac.uk>
1999-05-03 0:00 ` Joshua E. Rodd
1999-05-04 0:00 ` Ed Avis
1999-05-04 0:00 ` Barry Margolin
1999-05-04 0:00 ` Ed Avis
1999-05-04 0:00 ` Barry Margolin
1999-05-08 0:00 ` dewarr
1999-05-04 0:00 ` Peter Seebach
1999-05-04 0:00 ` Alan Braggins
1999-05-01 0:00 ` Phil Hunt
1999-05-02 0:00 ` Andy Isaacson
1999-05-03 0:00 ` Robert Dewar
1999-05-02 0:00 ` Ed Avis
1999-05-02 0:00 ` Phil Hunt [this message]
1999-05-02 0:00 ` Ed Avis
1999-05-03 0:00 ` dennison
1999-05-02 0:00 ` Ole-Hjalmar Kristensen
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` Robert Dewar
1999-04-30 0:00 ` Ed Avis
1999-04-30 0:00 ` spblunt
1999-04-30 0:00 ` David Kastrup
1999-04-27 0:00 ` David Kastrup
1999-04-27 0:00 ` Lynn Winebarger
1999-04-26 0:00 ` Tim Smith
1999-04-27 0:00 ` Barry Margolin
1999-04-27 0:00 ` Lynn Winebarger
1999-04-27 0:00 ` spblunt
1999-04-27 0:00 ` Robert Dewar
1999-04-26 0:00 ` spblunt
1999-04-26 0:00 ` Robert Dewar
1999-04-26 0:00 ` Tim Smith
1999-04-26 0:00 ` Robert Dewar
1999-04-26 0:00 ` Kenneth P. Turvey
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` Barry Margolin
1999-05-02 0:00 ` Mitch Blevins
1999-05-02 0:00 ` Sam Holden
1999-05-03 0:00 ` Barry Margolin
1999-04-27 0:00 ` Phil Hunt
1999-04-27 0:00 ` David Kastrup
1999-04-27 0:00 ` Lynn Winebarger
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` Lynn Winebarger
1999-05-05 0:00 ` Richard E. Hawkins Esq.
1999-04-26 0:00 ` Barry Margolin
1999-04-26 0:00 ` Robert Dewar
1999-04-23 0:00 ` GPL and "free" software (was: air traffic control software) Larry Kilgallen
1999-04-23 0:00 ` Robert Dewar
1999-04-21 0:00 ` dennison
[not found] ` <DXqW2.244$jw4.22256@burlma1-snr2>
[not found] ` <7gdln1$vna$1@jetsam.uits.indiana.edu>
[not found] ` <372ADFBD.4F4C241B@doc.ic.ac.uk>
1999-05-01 0:00 ` GPL and "free" software Lynn Winebarger
[not found] ` <7gff2f$8o2@www.inetnow.net>
1999-05-01 0:00 ` Ed Avis
1999-05-03 0:00 ` Joshua E. Rodd
[not found] ` <m2zp3pat3q.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1999-05-03 0:00 ` Joshua E. Rodd
1999-05-04 0:00 ` Ed Avis
1999-05-04 0:00 ` Larry Kilgallen
1999-05-03 0:00 ` Barry Margolin
[not found] ` <7gdd9e$36l$1@flotsam.uits.indiana.edu>
[not found] ` <372ADF48.B3C88507@doc.ic.ac.uk>
1999-05-04 0:00 ` Nick Roberts
1999-05-07 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox