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,a327d56b3d5e9a4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 13:25:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-05!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Booch: iterator invalidation Date: Fri, 8 Nov 2002 15:00:17 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3dcbb4e4$0$299$bed64819@news.gradwell.net> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:30615 Date: 2002-11-08T15:00:17-06:00 List-Id: Jeffrey Creem wrote in message ... >Usually no need to resort to #ifdef preprocessor stuff.. Just make a generic formal >that says error checking enabled. Generic actual parameter is a >constant/static then any decent compiler will optimize out any of the actual >checks in the object code and you get the same effect as the #ifdefs without >the lack of portability. That won't work for a compiler which does generic sharing of implementations. In that case, the code would remain all of the time. (This is true of Janus/Ada and the ICC compiler.) But why make it a parameter? Just make in a constant in the body of the source code, and change it as needed. Randy.