[Bug libstdc++/58804] dynamic_bitset<> uses popcountl on long long

3dw4rd at verizon dot net gcc-bugzilla@gcc.gnu.org
Sat Oct 19 21:50:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58804

--- Comment #7 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Marc,

I have word_type to be any unsigned integral.  I don't see why either 'unsigned
int' or 'unsigned __int128' would be a problem.

Except for the bit ....  Oh shit.  I need template versions of the bit
builtins.  Never mind my last patch.

I actually wish they would standardize these.

As for standardizing this bitset I'm not so sure.  I was reading all these
papers for ideas like this and what i did was put together a class with an API
that is a Convex Hull of bitset, vector<bool>, and some kind of integer class. 
I really think that it's too much - an incoherent design.  I think the word
access spoils the bitset/vector<bool> use.  I think two classes: a
bitset/vector<bool> that would be a total drop in replacement for vector<bool>
and a separate multiprecision <integer> with access to limbs would have been
better.

Sigh.



More information about the Gcc-bugs mailing list