From 1824772829269720114 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,857007135a18bc05 X-Google-Attributes: gidf78e5,public From: sbnaran@uiuc.edu (Siemel B. Naran) Subject: Re: static_cast to void Date: 1999/09/12 Message-ID: #1/1 X-Deja-AN: 524106142 X-NNTP-Posting-Host: rochester-35.slip.uiuc.edu Approved: stephen.clamage@sun.com (comp.std.c++) References: <7rb6h3$48l$1@news.netmar.com> X-UID: 0000000001 X-Status: $$$T Organization: University of Illinois at Urbana-Champaign User-Agent: slrn/0.9.5.7 (UNIX) Reply-To: sbnaran@uiuc.edu Newsgroups: comp.std.c++ Originator: clamage@taumet On 12 Sep 99 03:00:05 GMT, Masao Morita wrote: >First one is a passive reason. It's for informing to a compliler discarding >the expression(the return value of a fnction call). As a result of this, >it makes avoiding accidental overlooking and suppresses the warning message >by a complier. Though it seems rare to me that one will ever want to use this feature. >Second one is a more active reason. It's for calling a destructor of a >temporary object immediately. When the calling sequence is very important, >it is useful. (I got it now!) Are you sure of this one? > static_cast(SomeExpression); > static_cast(SomeExpression); I think these are equivalent. -- -------------- siemel b naran -------------- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]