🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.c
Article #4556

g++-2.1 template class question.

#4556
From: Kazuyoshi Sasaki
Date: Thu, 18 Jun 1992 06:37
76 lines
2987 bytes
g++-2.x $@$N(Jtemplate $@5!G=$N$3$H$GC/$+65$($F2<$5$$(J(_o_)$@!#(J

template <class T>  $@$G@k(J$@8@$7$?%/%i%9$N%a%s%P4X?t$,(Jstatic $@$K(J
$@$J$C$A$c$&$s$G$9$,!"$3$l$r30It$+$i;2>H$G$-$k$h$&$K$7$?$$$N$G$9$,(J
$@$I$&$9$l$P$$$$$s$G$7$g$&!#(J

$@6qBNE*$K$O$3$s$J46$8$N(Jtypescript $@$G$9!#(J
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Script started on Thu Jun 18 15:17:01 1992
bash$ cat test.cc
// This may look like C code, but it is really -*- C++ -*-

//
// template $@$r;H$C$?(Jclass $@$N@k8@(J
//

template <class Type>
class Hoge{
    Type a;
  public:
    Hoge(Type);
};

template <class Type>
Hoge<Type>::Hoge(Type x):a(x){}

Hoge<int>;

//
// template $@$r;H$o$J$$(Jclass 
//

class Hoge_int{
    int a;
  public:
    Hoge_int(int);
};

Hoge_int::Hoge_int(int x):a(x){}

bash$ gcc -v -c test.cc
Reading specs from /usr/local/lib/gcc-lib/sparc/2.1/specs
gcc version 2.1
 /usr/local/lib/gcc-lib/sparc/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix test.cc /usr/tmp/cca13702.i
GNU CPP version 2.1 (sparc)
 /usr/local/lib/gcc-lib/sparc/2.1/cc1plus /usr/tmp/cca13702.i -quiet -dumpbase test.cc -version -o /usr/tmp/cca13702.s
GNU C++ version 2.1 (sparc) compiled by GNU C version 2.1.
 /usr/local/lib/gcc-lib/sparc/2.1/as -o test.o /usr/tmp/cca13702.s
bash$ nm test.o
00000000 T ___8Hoge_inti
00000028 t ___t4Hoge1Zii
00000000 t gcc2_compiled.
bash$ exit 

script done on Thu Jun 18 15:17:37 1992
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

$@IaDL$N%/%i%9$N%a%s%P!<4X?t(J($@%3%s%9%H%i%/(J$@%?(J)$@$O(J

00000000 T ___8Hoge_inti

$@$H$J$j!"30It$+$i$b;2>H$G$-$^$9$,(J template $@$r;H$C$?(Jclass $@$N(J
$@J}$N(Jmember $@4X?t(J $@$,(J...

00000028 t ___t4Hoge1Zii

$@$H$$$&$h$&$K(Jstatic $@$K$J$C$F$$$^$9!#$I$&$9$l$P30It;2>H2DG=$K(J
$@$J(J$@$k$s$G$7$g$&$+(J?

$@$H$3$m$G!"(Jgcc-2.x $@$G(Jtemplate $@$,;H$($k$H$$$&$N$O(Jgnu.g++.* $@$rFI$s$G$$$F(J
$@CN$C$?$s$G$9$,(J$@!"(Jgcc.info $@$H$+$K$O=q$$$F$^$;$s$h$M!#$I$3$K=q$$$F$k$s$G(J
$@$7$g$&(J? 

$@Bg%\%1$+$^$7$F$k$+$bCN$l$^$;$s$,$h$m(J$@$7$/$*4j$$$7$^$9!#(J
--
sasaki
Technical Details
Message-ID: <SASAKI.92Jun18153722@comet.ttl.cas.uec.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!virgil!ccgwy!soprano!news.voice.cas.uec.ac.jp!sasaki

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 106434,75a9e4ed36c1e849,start
X-Google-Attributes: gid106434,public
X-Google-ArrivalTime: 1992-06-17 19:18:16 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!virgil!ccgwy!soprano!news.voice.cas.uec.ac.jp!sasaki
From: sasaki@ttl.cas.uec.ac.jp (Kazuyoshi Sasaki)
Newsgroups: fj.lang.c
Subject: g++-2.1 template class question.
Message-ID: <SASAKI.92Jun18153722@comet.ttl.cas.uec.ac.jp>
Date: 18 Jun 92 06:37:22 GMT
Sender: news@voice.cas.uec.ac.jp
Distribution: fj
Organization: The University of Electro-Communications, Tokyo, Japan.
Lines: 76
Nntp-Posting-Host: comet.ttl.cas.uec.ac.jp