From -1109853913990951614
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,857007135a18bc05
X-Google-Attributes: gidf78e5,public
From: Ron Natalie <ron@sensor.com>
Subject: Re: static_cast to void
Date: 1999/09/10
Message-ID: <37D843AB.E7446C98@sensor.com>#1/1
X-Deja-AN: 523234097
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <M-MORITA.99Sep9141115@pdss7.trc.rwcp.or.jp>
X-Original-Date: Thu, 09 Sep 1999 18:32:59 -0500
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-2
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: ariel.ucs.unimelb.edu.au 936934891 22830 128.250.29.16 (10 Sep 1999 03:41:31 GMT)
Organization: Sensor Systems
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN9h95+EDnX0m9pzZAQE3yQF/b7VHZ17t9rUexW0RZ+fEugBHzFiwLFrt Wz/Kj4hUuXgtO8KV5lY1i/mtgpm+0C7K =TE8z
Mime-Version: 1.0
NNTP-Posting-Date: 10 Sep 1999 03:41:31 GMT
Newsgroups: comp.std.c++

Masao Morita wrote:
> 

> 
>     static_cast<void>(Any_Expression);
> 
> This expression looks like meaningless.
> Probably, the content of Any_expression would make sence in any case.
> what sort of case?
>

Sometimes in templates void ends up being a useful construct.
It's the same reason why void functions can return void expressions.
---
[ 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              ]



