From -4598832105150658329
X-Google-Thread: 7894ca11fe,82cd3599ce330676
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 31 Mar 2010 22:50:01 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM>
Newsgroups: comp.std.c++
Subject: Re: throwing in a noexcept(true) function
Organization: Wacks Wicks Works
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <IU.D20100330.T204126.P3669.Q0@J.de.Boyne.Pollard.localhost>
References: <hmud3v$7vm$1@news.albasani.net>
	<3707c5ae-e25f-4ca2-9195-8b8be17ddec1@b9g2000pri.googlegroups.com>
	<c8rdq5dkqhmg0astv6kafisbvubjedjmmu@4ax.com>
	<4BAE1663.1E83B5D3@web.de>
	<ojhsq5p9rvq9jor0ujdreuq0uvag4qm69i@4ax.com>
	<8i12r5hoe7gqsiagpjv12103gtdo0vbh39@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Tue, 30 Mar 2010 21:41:08 +0100
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Wed, 31 Mar 2010 22:49:04 CST
Lines: 31
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-u5F2sXKgX5on87a94FGEM3KkMXwOk0lKrpbhYw4YbqqMvaCZ9p45LFuEH1TpOfb3hQK/5uk4znr2URw!oN5NSuJfemd2gfxm2kVCvDPRzMOAkeZBzAnHqxR4YSqVhpEbeMvJrXRvPWUCfUoOTDfPiqNysW0W!+hJYJjGtN5C+My3fIg==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:2350

>
>
> To summarize, the main two points of view that were expressed were that that trying to propagate an exception out of a noexcept function should result in:
>
> a) All bets off: Undefined behavior [...]
>
> b) Termination: [...]
>
> The committee has currently penciled in (b).
>
Another choice that was suggested by some members of the BSI C++ Panel is:

c) implementation-defined behaviour

It's not undefined behaviour, but, equally, it's not as rigid as "the
program shall always terminate", either; which would satisfy those who
are (I am told) in the "option (b) is premature standardization" camp.

> In particular, noexcept enables optimizations not only in the caller but also in the callees, so that the optimizer can assume that functions called in a noexcept function and not wrapped in a try/catch are themselves noexcept without being declared such (e.g., C standard library functions are not so annotated).
>
That's not the way that other people are seeing this.  Indeed, one
question that is doing the rounds is whether the two strchr()s in the
C++ library should be declared noexcept(true) in the text of the
standard.

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



