incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <mse...@gmail.com>
Subject Re: std::length_error in language support library
Date Mon, 31 Aug 2009 19:26:15 GMT
On 08/21/2009 10:34 AM, Farid Zaripov wrote:
>    Looking at the latest draft of the C++ standard (n2914.pdf) it appears,
> that
> the std::length_error can be defined in language support library.
>
>    This is the result of resolution of the CWG issue #624:
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#624

That's a problem. Let me see if there's any willingness among
the committee to revert it to bad_alloc.

Martin

>
> 5.4.3 p7:
> --------------
> 7 When the value of the expression in a noptr-new-declarator is zero, the
> allocation function is called to
> allocate an array with no elements. If the value of that expression is such
> that the size of the allocated object
> would exceed the implementation-defined limit, no storage is obtained and
> the new-expression terminates
> by throwing an exception of a type that would match a handler (15.3) of type
> std::length_error (19.2.4).
> --------------
>
> Farid
>


Mime
View raw message