[C++-sig] py++ and std::bitset

Kirill Lapshin kir at lapshin.net
Thu Nov 30 10:43:04 CET 2006


Roman,

Currently py++ (or, rather pygccxml) complains about std::bitset. It is 
a mere warning, and does not affect me -- I am not exposing any bitsets 
to python yet. Still I am a bit worrying that I might have such a need 
in future. It might very well be that this warning is really harmless in 
this particular case, and can be ignored. Could you verify my analysis?

I am using gccxml from CVS (reasonably recent, though not the latest) 
built on cygwin, cygwin gcc 3.4.4, Py++ and pygccxml 0.8.2.

The problem arises from _Base_bitset<size_t _Nw> that has member _WordT 
_M_w[_Nw]. Gccxml reports that max for this array is (_Nw-1) which 
pygccxml does not recognize (it expects a number).

_Base_bitset is a private base of std::bitset.

I am getting warning:
UserWarning: unable to find out array size from expression "(_Nw - 1)"

I suppose that won't affect exposing bitset since it is a member of 
private base, which I don't really have (and can't) expose anyways.

Is it so?

Can something be done on pygccxml to support templated arrays, and 
effectively remove this warning?

Regards,
Kirill




More information about the Cplusplus-sig mailing list