libc++: Adding std::bad_array_length

Howard Hinnant howard.hinnant at
Tue Sep 10 18:21:55 PDT 2013

On Sep 9, 2013, at 7:29 PM, Marshall Clow <mclow.lists at> wrote:

> While reviewing my <dynarray> implementation, Richard pointed out that it should throw bad_array_length if the length was too large.
> I tried to do that, only to discover that libc++ didn't have std::bad_array_length.
> This patch remedies that (with a test)
> There is a corresponding patch for libcxxabi coming.
> -- Marshall
> Marshall Clow     Idio Software   <mailto:mclow.lists at>
> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
>        -- Yu Suzuki
> <libcxx-bad_array_length.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at

One quibble:  There's a tab in src/new.cpp between #define and _LIBCPP_BUILDING_NEW.

Please commit.


More information about the cfe-commits mailing list