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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd40601768eaf8fd X-Google-Attributes: gid103376,public From: Hyman Rosen Subject: Re: Array of Variant Records Question... Date: 1999/09/13 Message-ID: #1/1 X-Deja-AN: 524585438 Sender: hymie@calumny.jyacc.com References: <7r5vh3$imu1@svlss.lmms.lmco.com> <37d6a45c@news1.prserv.net> <37d6ccb6@news1.prserv.net> <7r77i8$i08$1@nnrp1.deja.com> <37d7c116@news1.prserv.net> <7r8t21$ov5$1@nnrp1.deja.com> <37d822a1@news1.prserv.net> <7reg02$t83@dfw-ixnews6.ix.netcom.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 937250985 7881 209.49.126.226 (13 Sep 1999 19:29:45 GMT) Organization: PANIX Public Access Internet and UNIX, NYC Mime-Version: 1.0 User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.3 NNTP-Posting-Date: 13 Sep 1999 19:29:45 GMT Newsgroups: comp.lang.ada Date: 1999-09-13T19:29:45+00:00 List-Id: Richard D Riehle writes: > One of things I do not like about the current C++ standard is the > kludge that permits "cast away const". Would not want this in Ada. It's not a kludge, any more than unchecked conversion is. I suspect that C++'s greatest need for const_cast comes from having to support old C libraries which did not use const in their interfaces. You have a function which takes a 'char *' rather than a 'char const *' parameter, but the documentation of the function promises that it leaves the contents unchanged. You have a 'char const *' that you need to pass to this function. So you cast away const.