Article View: alt.linux
Article #1086Re: Templates
From: Pascal Proulx
Date: Wed, 14 Apr 1999 00:00
Date: Wed, 14 Apr 1999 00:00
58 lines
2947 bytes
2947 bytes
This is a multi-part message in MIME format. --------------80E116C32C04069E3062FFC8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Martijn, read the info files provided with gcc. You are right: template code must reside in a header file. >All functions in template classes must be inline. I do not agree! Pascal Martijn Lievaart wrote: > Alexander Dymerets wrote in message <370C598E.C8C64F66@te.net.ua>... > >Hi! > >> I'm trying to design template classes in C++ (under Linux and Solaris) > using > >> the gcc compiler, but I'm running into trouble. It seems that the > template > >> functions must be written > >> within the header (.h) file. Whenever they are written in the .cpp file > I > >> get errors about them not being there. > > > >All functions in template classes must be inline. > > Apart from some bugs in some compilers, this is simply not true. It is the > most portable though. > > Martijn > -- > My reply-to address is intentionally set to /dev/null > reply to mlievaart at orion in nl --------------80E116C32C04069E3062FFC8 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Pascal Proulx Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Pascal Proulx n: Proulx;Pascal org: Computing Devices Canada, a General Dynamic Company email;internet: pascal.proulx@cdott.com title: Software Engineer x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------80E116C32C04069E3062FFC8--
Technical Details
Message-ID:
<3714F74F.49173BD0@cdott.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<ShVO2.260$G4.285045@news.abs.net> <370C598E.C8C64F66@te.net.ua> <7ei7vb$nad@news3.euro.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,eaa6e2f181a1fe60 X-Google-Attributes: gidf5392,public X-Google-Thread: f8c9b,eaa6e2f181a1fe60 X-Google-Attributes: gidf8c9b,public X-Google-Thread: 10c696,eaa6e2f181a1fe60 X-Google-Attributes: gid10c696,public X-Google-Thread: fc89c,eaa6e2f181a1fe60 X-Google-Attributes: gidfc89c,public X-Google-Thread: faa64,eaa6e2f181a1fe60 X-Google-Attributes: gidfaa64,public X-Google-Thread: 10ba33,eaa6e2f181a1fe60 X-Google-Attributes: gid10ba33,public X-Google-Thread: 100c5f,eaa6e2f181a1fe60 X-Google-Attributes: gid100c5f,public X-Google-Thread: 109fba,eaa6e2f181a1fe60 X-Google-Attributes: gid109fba,public From: Pascal Proulx <pascal.proulx@cdott.com> Subject: Re: Templates Date: 1999/04/14 Message-ID: <3714F74F.49173BD0@cdott.com> X-Deja-AN: 466425424 References: <ShVO2.260$G4.285045@news.abs.net> <370C598E.C8C64F66@te.net.ua> <7ei7vb$nad@news3.euro.net> Content-Type: multipart/mixed; boundary="------------80E116C32C04069E3062FFC8" Organization: Computing Devices Canada Mime-Version: 1.0 Newsgroups: alt.linux,alt.os.linux,comp.lang.c++,comp.os.linux.development.apps,comp.os.linux.development.system,comp.unix.programmer,comp.unix.questions,gnu.g++.help,gnu.gcc.help