Roll your own from scratch or use the boost classes as a base ?
It's not like working with bits is a very hard thing to do.
I certainly wouldn't want to pay for a library just to fiddle some bits around.
It's easy enough to write a bit class on top of some other storage class like CArray or std::vector.
In my project it is a common task to store and work with large bit masks, that contain less number of ones. So they could be compressed well in memory. I found one library called BitMagic (http://bmagic.sourceforge.net/), but also looking for other options.
You could have given us a bit more info about the reasons behind your question from the start. There's a big difference between asking for a library/class that can handle bitmasks. and a class that can handle something like 500 million bits, and where spacial compression could be beneficial.
Just some bit fiddling is as I said easy and something you can roll on your own in an hours work at most. An efficient design for what you asking may very well need a solution that is tailor made to the specific problem domain, depending on how many actions you are doing on said mask.
If you have a VERY sparse mask (say a couple hundred to thousand bits set), then it's possible the best solution is an implementation around an array/vector that just stores the indices of the enabled bits.
This'll degrade fast as you need more enabled bits.
There are other solutions. but it all depends on what you end up doing. A generic library may be easy, but it may also result in average or even downright bad performance on datasets or behaviour that isn't in line with what the generic library was conceived to solve.