Question regarding dynamic_bitset -

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question regarding dynamic_bitset -

QuitePlace
boost::dynamic_bitset<byte> m_patterndelta;

// intialization of m_patterndelta

....

std::vector<byte> pack;

boost::to_block_range<byte>(m_patterndelta, pack.begin()); // GPF because of
bad pointer in "pack". Cannot figure why, may be someone can help?



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding dynamic_bitset -

Pablo Aguilar
Michael wrote:

> boost::dynamic_bitset<byte> m_patterndelta;
>
> // intialization of m_patterndelta
>
> ....
>
> std::vector<byte> pack;
>
> boost::to_block_range<byte>(m_patterndelta, pack.begin()); // GPF because of
> bad pointer in "pack". Cannot figure why, may be someone can help?


How about trying:


boost::to_block_range<byte>(m_patterndelta, back_inserter(pack));


you're trying to write to pack's elements, which are none at the point
of the call.


HTH
Pablo Aguilar

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users