Mikhail Maltsev
05a2d17668
[libcxx] Throw correct exception from std::vector::reserve
...
According to the standard [vector.capacity]/5, std::vector<T>::reserve
shall throw an exception of type std::length_error when the requested
capacity exceeds max_size().
This behavior is not implemented correctly: the function 'reserve'
simply propagates the exception from allocator<T>::allocate. Before
D110846 that exception used to be of type std::length_error (which is
correct for vector<T>::reserve, but incorrect for
allocator<T>::allocate).
This patch fixes the issue and adds regression tests.
Reviewed By: Quuxplusone, ldionne, #libc
Differential Revision: https://reviews.llvm.org/D112068
2021-10-21 10:40:48 +01:00
..
2021-10-12 06:08:23 -04:00
2021-09-09 11:05:54 -04:00
2021-08-31 18:45:19 +02:00
2021-10-10 21:57:10 -04:00
2021-09-02 19:27:49 +02:00
2021-10-14 17:40:45 +02:00
2021-10-12 06:08:23 -04:00
2021-10-09 13:31:20 +02:00
2021-10-18 19:12:42 +01:00
2021-06-19 07:49:06 -04:00
2021-10-18 10:38:31 -04:00
2021-09-21 21:14:50 -04:00
2021-10-12 06:08:23 -04:00
2021-08-27 12:41:55 -04:00
2021-10-18 19:12:42 +01:00
2021-07-01 14:01:49 -04:00
2021-09-01 19:45:02 +02:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-08-27 12:41:55 -04:00
2021-07-01 14:01:49 -04:00
2021-10-12 18:15:35 +02:00
2021-07-28 11:07:06 +00:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-09-22 16:03:00 -04:00
2021-09-07 15:26:33 -04:00
2021-09-08 13:34:01 -04:00
2021-10-12 06:08:23 -04:00
2021-06-03 18:18:42 -04:00
2021-10-07 18:10:47 +02:00
2021-09-01 10:51:09 -04:00
2021-08-27 12:41:55 -04:00
2021-06-24 17:57:29 +00:00
2021-09-08 09:09:28 -04:00
2021-10-12 17:28:08 +02:00
2021-07-27 20:09:01 -04:00
2021-09-09 11:05:54 -04:00
2021-09-08 15:20:58 -04:00
2021-06-04 09:55:21 -04:00
2021-06-04 09:55:21 -04:00
2021-10-15 17:52:58 +02:00
2021-10-19 14:21:33 -04:00
2021-06-04 09:55:21 -04:00
2021-08-24 14:11:32 -04:00
2021-10-12 06:08:23 -04:00
2021-09-08 09:09:28 -04:00
2021-10-12 06:08:23 -04:00
2021-10-10 21:57:10 -04:00
2021-09-02 19:22:15 +02:00
2021-06-04 09:55:21 -04:00
2021-06-04 09:55:21 -04:00
2021-06-04 09:55:21 -04:00
2021-10-12 06:08:23 -04:00
2021-06-04 09:55:21 -04:00
2021-08-24 14:11:32 -04:00
2021-09-03 14:26:59 -04:00
2021-08-24 14:11:32 -04:00
2021-08-24 14:11:32 -04:00
2021-09-03 14:26:59 -04:00
2021-08-26 13:26:31 -04:00
2021-10-07 18:10:47 +02:00
2021-06-24 17:57:29 +00:00
2021-10-20 13:55:50 -04:00
2021-10-12 06:08:23 -04:00
2021-10-07 18:10:47 +02:00
2021-08-24 14:11:32 -04:00
2021-10-10 21:57:10 -04:00
2021-08-27 12:45:53 -04:00
2021-08-11 13:36:29 -04:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-08-12 10:11:27 -07:00
2021-10-12 18:15:35 +02:00
2021-10-12 06:08:23 -04:00
2021-08-23 15:34:51 -04:00
2021-10-07 18:10:47 +02:00
2021-09-08 15:20:58 -04:00
2021-08-27 12:41:55 -04:00
2021-10-12 06:08:23 -04:00
2021-06-24 17:57:29 +00:00
2021-10-18 19:12:42 +01:00
2021-08-27 12:41:55 -04:00
2021-09-22 16:03:00 -04:00
2021-10-12 06:08:23 -04:00
2021-09-08 15:20:58 -04:00
2021-07-27 20:09:01 -04:00
2021-10-10 14:21:01 +02:00
2021-09-23 08:53:59 -04:00
2021-10-12 06:08:23 -04:00
2021-06-24 17:57:29 +00:00
2021-09-21 16:19:31 -04:00
2021-09-08 09:09:28 -04:00
2021-10-12 22:31:32 -04:00
2021-06-28 12:55:26 -04:00
2021-09-08 15:20:58 -04:00
2021-09-03 14:26:59 -04:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00
2021-09-22 16:03:00 -04:00
2021-08-27 12:45:53 -04:00
2021-10-08 16:24:28 -07:00
2021-10-10 14:35:05 -04:00
2021-07-01 14:01:49 -04:00
2021-06-28 10:00:33 -04:00
2021-10-12 18:15:35 +02:00
2021-09-20 14:46:38 -04:00
2021-10-11 14:34:45 -04:00
2021-10-07 18:10:47 +02:00
2021-09-22 16:03:00 -04:00
2021-10-21 10:40:48 +01:00
2021-10-04 13:34:26 -04:00
2021-10-12 06:08:23 -04:00
2021-10-12 06:08:23 -04:00