Construct bitset from array of integers

前端 未结 2 1187
别那么骄傲
别那么骄傲 2021-01-17 18:59

It\'s easy to construct a bitset<64> from a uint64_t:

uint64_t flags = ...;
std::bitset<64> bs{flags};
<
2条回答
  •  一生所求
    2021-01-17 19:34

    If initializing from range is important, you might consider using std::vector

    It does have constructor from pair of iterators

提交回复
热议问题