[C++-sig] boost::python and __declspec(align(16))

2009-06-18 Thread Simon Pickles

Hi,

I think this is an MSVC problem caused by the bad STL implementation, 
but I wondered if there was a work around.


Both my client (Win32 MSVC8) and server (ubuntu GCC 4.2.3) share the 
same c++ code. It compiles and runs on GCC but fails on MSVC.


This uses the the bullet physics library and includes a type defined 
like this:


__declspec(align(16)) btVector3 {/*...*/};

When building my boost::python extension with:

class_("BtVector3", init());

I get an error like this :

C:\boost_1_38_0\boost/python/converter/as_to_python_function.hpp(21) : 
error C2719: 'unnamed-parameter': formal parameter with 
__declspec(align('16')) won't be aligned
   C:\boost_1_38_0\boost/python/to_python_converter.hpp(88) : see 
reference to class template instantiation 
'boost::python::converter::as_to_python_function' being compiled

   with
   [
   T=btVector3,
   /*  Huge call stack omitted for clarity */
   build.cpp(155) : see reference to class template instantiation 
'boost::python::class_' being compiled

   with
   [
   W=btVector3
   ]

Is there a way to overcome this? switch to MinGW? :)

Thank you very much

Simon
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] boost.python: no overflow checking for unsigned int parameters ?

2009-06-18 Thread Anderson Lizardo
On Mon, Jun 15, 2009 at 4:23 PM, Ralf W. Grosse-Kunstleve wrote:
>
> If you send me a patch (against the boost trunk) I'll test it and check it in.
> Probably, the file to be changed is
>  boost/libs/python/src/converter/builtin_converters.cpp
> I'd try working with
>  boost/numeric/conversion/cast.hpp

Done. See https://svn.boost.org/trac/boost/ticket/3189 and the patch
attached to it.

Note the patch still lacks the addition of a test to the test suite.
I'm working on it, but you can test it in advance.

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig