Jonatan Taminau wrote:
> However, I should be able to do this in a more performant way without the
How many bits do you have?
If it is less than or equal to the size in bits of your platform's
unsigned long type, the solution is easy: use bitset::to_ulong(), and
just store the value in an integer column.
If it is more than that, you will have a much slower solution (though
faster than to_string()). You will have to use count() and iterate over
the "container" calling test() on each bit to construct your own binary
representation. There seems to be no direct way to extract the data in
the internal binary representation; this is probably A Feature (TM).
To keep this relevant to the mailing list, I invite you to work out an
adapter of some sort to do it both ways, for use with MySQL++'s SSQLS
Good luck with this new project you've volunteered for. We're all
rooting for you. :)