Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

History and evolution of the noexcept proposal?

已查看 16 次
跳至第一个未读帖子

Martin B.

未读,
2011年4月12日 15:10:342011/4/12
收件人

Hi!

As the thread [How on earth did noexcept get through the standards
process?][1] on c.l.c++.m has shown, there is a lot of confusion,
disappointment and questions around `noexcept`.

While the feature we've got is apparently the feature we've got for now -
[We have FDIS!][2] - I at least would find it interesting to see a history
of how `noexcept` evolved into the current form [N3242][3] (see, among other
sections, 15.5.1 The std::terminate() function).

Danny Kalev did a great job about a year ago of summarizing [The debate on
noexcept][4] but I am unclear if there are any more recent changes wrt this
feature and also whether he's spot on on all arguments.

I think the following bullets would help in isolation to clear up some
questions that arose in [1]:

* Search help: Is there an easy way of searching/finding/obtaining a list of
all WG21 proposals and papers that deal with `noexcept` and for each to
verify when it was accepted or rejected and why?

* Rationale: Why was the noexcept-block, as proposed in [N2855][5], scraped?
This block would have made it trivial for compilers to statically "enforce"
`noexcept`, just as they "enforce" `const` at the moment.

* Rationale: Why did "call terminate()" win over "undefined behaviour" for
`noexcept` violations.

* Rationale: Why was it left implementation-defined, whether the stack would
be unwound/partially in case of a noexcept violation?


Any pointers appreciated. Please keep the guesswork to a minimum and mark it
clearly as guesswork :-)

cheers,
Martin

[1] :
http://groups.google.com/group/comp.lang.c++.moderated/browse_frm/thread/9adab213129c178/7afafcdf84c5f7b1
[2] :
http://herbsutter.com/2011/03/25/we-have-fdis-trip-report-march-2011-c-standards-meeting/
[3] : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
[4] : http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=481
[5] :
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2855.html#noexcept-block


--
Stop Software Patents
http://petition.stopsoftwarepatents.eu/841006602158/
http://www.ffii.org/


[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp...@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Martin B.

未读,
2011年4月28日 14:19:482011/4/28
收件人

On 12.04.2011 21:10, Martin B. wrote:

>
> As the thread [How on earth did noexcept get through the standards
> process?][1] on c.l.c++.m has shown, there is a lot of confusion,
> disappointment and questions around `noexcept`.

> (...)


> I think the following bullets would help in isolation to clear up some
> questions that arose in [1]:
>
> * Search help: Is there an easy way of searching/finding/obtaining a
> list of
> all WG21 proposals and papers that deal with `noexcept` and for each to
> verify when it was accepted or rejected and why?
>
>

My Google search for this included variations on:

noexcept site:http://www.open-std.org/jtc1/sc22/wg21
N2855 site:http://www.open-std.org/jtc1/sc22/wg21
"noexcept block" site:http://www.open-std.org/jtc1/sc22/wg21
...

* Rationale: Why was the noexcept-block, as proposed in [N2855][5],
> scraped?
> This block would have made it trivial for compilers to statically "enforce"
> `noexcept`, just as they "enforce" `const` at the moment.

> (...)
>

Interestingly, N2855 was the *only* reference in papers, minutes and
comments I could find wrt. the noexcept-block.

Wrt. to statically checking noexcept, I could find one (1) other reference
in a side note in N3202 - To which extent can noexcept be deduced? - by
Bjarne Stroustrup:

(...) First: in general we cannot know
if a function throws - that would
require (perfect) flow analysis (and in the worst case
solving the halting problem). (...)

(...) I know that some wants static checking of
noexcept, but I don't and I consider static
checking not an option for C++0x. I don't even
want that discussion now. (...)

So it would appear I didn't find any rationale on this (yet), but at least
Bjarne "Mr. C++" Stroustrup seemed convinced at one point that statically
checking noexcept doesn't make sense at the moment.

cheers,
Martin


--

0 个新帖子