N4152: uncaught_exceptions -- Herb Sutter

A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4152

Date: 2014-09-30

uncaught_exceptions

by Herb Sutter

Excerpt:

This paper is a revision of N3614 to implement EWG direction in Bristol.

...

This paper proposes a new function int std::uncaught_exceptions() that returns the number of exceptions currently active, meaning thrown or rethrown but not yet handled.

Add a Comment

Comments are closed.

Comments (2)

1 0

scfrench said on Oct 5, 2014 07:45 PM:

Should the return type of std::uncaught_exceptions be an unsigned type?
0 0

Kristian Ivarsson said on Nov 18, 2015 01:53 AM:

"The unsigned integer types are ideal for uses that treat storage as a bit array. Using an unsigned instead of an int to gain one more bit to represent positive integers is almost never a good idea. Attempts to ensure that some values are positive by declaring variables unsigned will typically be defeated by the implicit conversion rules"

- Bjarne Stroustrup