Date: Wed, 21 May 2025 18:15:03 +0200
std::bitset is a trivially copyable type in every implementation, although
I don't think it's required to be by the standard.
If you're willing to make some basic assumptions about its implementation,
you can use std::memcpy to super-efficiently copy all of its bits out of
the container.
Maybe we can sneak that into
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3103r2.html, one
of my proposals.
I don't think it's required to be by the standard.
If you're willing to make some basic assumptions about its implementation,
you can use std::memcpy to super-efficiently copy all of its bits out of
the container.
Maybe we can sneak that into
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3103r2.html, one
of my proposals.
Received on 2025-05-21 16:15:21