How to initialize a boost::dynamic_bitset from std

2019-09-08 01:00发布

问题:

How can I initialize a boost::dynamic_bitset from std::bitset? The simplest solution is a for loop:

for(int i=0;i<bitset_size;i++)
    my_dynamic_bitset[i] = my_bitset[i];

Is there any shorter or faster way to do this?