[C++-sig] Re: Boost::Python 1.13.1 on SuSE 9.1 x86_64

Jan Heiser jan.heiser at raubtierbaendiger.de
Thu Aug 5 18:14:02 CEST 2004


David Abrahams wrote:

> Jan Heiser <jan.heiser at raubtierbaendiger.de> writes:
> 
>> It boils down to the fact that on x86_64 unsigned and std::size_t do not
>> have the same width, unsigned still has 32 bits, std::size_t has 64 bits.
>>
>>
>> Now, my idea was to directly change the template function:
>>
>> boost/python/with_custodian_and_ward.hpp:79
>> - template <std::size_t custodian, std::size_t ward, class BasePolicy_ =
>> default_call_policies>
>> + template <unsigned custodian, unsigned ward, class BasePolicy_ =
>> default_call_policies>
> 
> I wouldn't want to make that change.  I'd much rather use a
> std::size_t for the arity variable at the line of the warning.  But
> either way, this warning is obviously completely bogus.  A size_t can
> never be greater than an unsigned int??!

Changing the type of arity works. You're right, this is probably better. Any
chance this will be put into CVS so it'll be part of the next release?

> My advice: turn off -Wall and/or -Werror.

For the project Boost::python is used in, it is important that -Wall -Werror
is turned on. After it was introduced, quite a number of bugs directly
showed up.

Jan




More information about the Cplusplus-sig mailing list