Files
bitcoin/src
Martin Leitner-Ankerl 11e7908484 prevector: only allow trivially copyable types
The prevector implementation currently can't be used with types that are
not trivially copyable, due to the use of memmove. Trivially copyable
implies that it is trivially destructible, see
https://eel.is/c++draft/class.prop#1.3

That means that the checks for std::is_trivially_destructible are not
necessary, and in fact where used it wouldn't be enough. E.g. in
`erase(iterator, iterator)` the elements in range first-last are destructed,
but it does not destruct elements left after `memmove`.

This commit removes the checks for `std::is_trivially_destructible`
and instead adds a `static_assert(std::is_trivially_copyable_v<T>);` to
make sure `prevector` is only used with supported types.
2022-04-24 20:02:04 +02:00
..
2021-09-29 14:10:29 +02:00
2022-03-02 12:09:27 +01:00
2022-01-31 16:53:12 +01:00
2021-11-12 11:46:34 +01:00
2022-04-20 14:29:29 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-03-23 17:36:33 -05:00
2022-03-24 11:36:37 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-04-19 10:25:39 +01:00
2022-02-13 20:59:07 +00:00
2022-04-20 14:29:29 +01:00
2022-01-02 11:40:31 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:40:31 +01:00
2022-03-23 17:36:33 -05:00
2022-01-02 11:52:11 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:13:40 +01:00
2021-12-30 19:36:57 +02:00
2022-03-23 17:36:33 -05:00
2022-03-10 13:05:29 +01:00
2022-01-02 11:40:31 +01:00
2022-01-28 18:07:08 +10:00