From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-22 04:40:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!unlisys!news.snafu.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Wed, 22 May 2002 11:40:35 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <4519e058.0205140718.3ddb1b2a@posting.google.com> <3CE15D0A.3050100@mail.com> <2s44eu0fm4g6606h9p4stb1b5oc0nmg5u8@4ax.com> <3CE2A946.5030808@mail.com> <3CE40B8E.70102@mail.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1022067635 1038 134.91.4.34 (22 May 2002 11:40:35 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 22 May 2002 11:40:35 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:24517 Date: 2002-05-22T11:40:35+00:00 List-Id: Dmitry A. Kazakov wrote: : C++ templates are simply untyped, substitute'n'pray. Is this a general statement? Out of couriosity: template < class Thing, int a, int plop(Thing a) > int oodle(Thing b) { return plop(b + a); } class does_not_have_plus { public: int count() { return 42; } }; int clrkpt(does_not_have_plus p) { return p.count(); } int main(int c) { does_not_have_plus me; return oodle(me); } g++ -c test.cc test.cc: In function `int oodle(does_not_have_plus)': test.cc:24: instantiated from here test.cc:7: no match for `does_not_have_plus & + int' So (lack of C++ template understanding on my side not withstanding) there are cases where a prayer isn't needed? -- Georg