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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!nntp.idg.pl!newsfeed.gazeta.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "Robert Kawulak" Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: Thu, 30 Sep 2004 20:52:21 +0200 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <41547dae$0$91007$39cecf19@news.twtelecom.net> <1g2d9xmnita9f.5ecju0eftkqw$.dlg@40tude.net> <87u4rkhddelw$.1uuoqhfyd2eay$.dlg@40tude.net> <6zobtdp3ckqx.plmvz5og15id.dlg@40tude.net> NNTP-Posting-Host: pe143.krakow.cvx.ppp.tpnet.pl X-Trace: nemesis.news.tpi.pl 1096570694 23603 213.76.40.143 (30 Sep 2004 18:58:14 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Thu, 30 Sep 2004 18:58:14 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:4454 Date: 2004-09-30T20:52:21+02:00 List-Id: Hi there! > What I meant is that you cannot have a vector > containing elements of vector, vector, vector etc. > vector and vector are unrelated types even if A is a descendant of B > or related to B. What do you want from a macro extension? (:-)) Whoops! So in my answer for Matthew Heaney's post I've misunderstood you again :-/ But yes, it *is* possible to have such vector, similarly to my example in mentioned answer (of course the code would need a few changes, it could be even simplier). But I'm wondering what in the world would you need such a vector for? ;-) > No, Ada generics have contracts. I see. But you can also have contracts for template parameters in C++. They aren't a core language construct like in Ada (and their use is a little bit less simple), but because of this they can be much more flexible. For details, have a look at boost::concept_check and boost::type_traits (http://www.boost.org). Best regards, Robert Kawulak