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,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "fabio de francesco" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 10 Mar 2005 21:16:37 -0800 Organization: http://groups.google.com Message-ID: <1110518197.330793.41200@z14g2000cwz.googlegroups.com> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110508346.652721.170680@g14g2000cwa.googlegroups.com> <1110514017.501621@athnrd02> NNTP-Posting-Host: 80.181.51.48 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1110518202 4114 127.0.0.1 (11 Mar 2005 05:16:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 11 Mar 2005 05:16:42 +0000 (UTC) In-Reply-To: <1110514017.501621@athnrd02> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=80.181.51.48; posting-account=Lp02jQ0AAABMd3TAghNf0TM2YBZqD_JE Xref: g2news1.google.com comp.lang.ada:9097 comp.lang.c++:45062 comp.realtime:1241 comp.software-eng:4809 Date: 2005-03-10T21:16:37-08:00 List-Id: Ioannis Vranos wrote: > [skip] > About the run-time checks one can easily implement a macro mechanism to > disable checks too, with the definition of a constant like before the > compilation like: > > > #define NOCHECKS I think that you have to heavily modify the program code, isn't true? Instead by means of "pragma suppress();" you can leave your code as it is, so when you have finished with all tests you do on it you can suppress checks with only one statement. It means that every time you come back to updating that code you can easily turn all checks on anew every time you need it. (With pragma suppress(...) the program will print "101" and go normally to the end). > Second, templates can be used for compile-time constraints, but I do not > know these stuff yet, so perhaps someone may provide this. And then one > could provide such a checking mechanism via templates (not of course to > mention once again template metaprogramming where an increment operation > could become compile-time). > > Ioannis Vranos If there is anyone who may provide such a checking mechanism via templates it would be appreciated. Ciao, fabio de francesco