3 ms·
- A lot of code won't work for types with no default constructors, but that is at least compile error - Using memcpy[0] for arbitrary types is just wrong, see
by kilotaras 3y ago
- A lot of code won't work for types with no default constructors, but that is at least compile error
- Using memcpy[0] for arbitrary types is just wrong, see [1]
[0] https://github.com/DNedic/lockfree/blob/main/lockfree/inc/bipartite_buf_impl.hpp https://github.com/DNedic/lockfree/blob/main/lockfree/inc/bi...
[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1144r7.html#non-trivial-samples https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p11...
- dnedic 3y agoThis is already noted in the Queue readme, only the Queue constructs the type, the other 2 data structures are meant for PODs only. I will take a look at adding support for constructing in-place for the other 2 data structures, but at the moment, they are just for PODs.