From -7356833647859353488
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/14
Message-ID: <slrn7trp6i.uk7.sbnaran@localhost.localdomain>#1/1
X-Deja-AN: 525048820
X-NNTP-Posting-Host: kyoto-1.slip.uiuc.edu
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <7rb6h3$48l$1@news.netmar.com> <t0t906dizlg.fsf@pdss7.trc.rwcp.or.jp> <slrn7tmca2.p2c.sbnaran@localhost.localdomain> <t0td7vn17e8.fsf@pdss7.trc.rwcp.or.jp>
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 13 Sep 99 17:27:38 GMT, Masao Morita <m-morita@pdss7.trc.rwcp.or.jp> wrote:

>>>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?

>Please consider.

>  Environment setup();


If I'm not mistaken, the quote from the standard said that the 'void' has
no effect on when the object is destroyed.

In both of the following

   setup(),setup();
   (void)setup(),(void)setup();

the compiler creates an Environment object, then creates a second
Environment object, then destroys this second Environment object,
then destroys the first.  Is my understanding correct?

-- 
--------------
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              ]




