[Cython] errors in C++ tests

Stefan Behnel stefan_ml at behnel.de
Sun Jul 8 20:54:59 CEST 2012


Lars Buitinck, 08.07.2012 20:38:
> 2012/7/8 Stefan Behnel:
>> """
>> cpp_operators.cpp: In function ‘void __Pyx_CppExn2PyErr()’:
>> cpp_operators.cpp:442: error: expected unqualified-id before ‘&’ token
>> cpp_operators.cpp:442: error: expected `)' before ‘&’ token
>> """
>>
>> The failing code line is this:
>>
>> """
>>   } catch (const std::bad_alloc& exn) {
>> """
> 
> Could you check whether the header <new> is included? It should be to
> get the definition of bad_alloc.

Ah, yes. I'm sure that's it. Are there any side-effects in that header
file, or would it be ok to always include it in C++ mode when the above
exception conversion function is used?

Stefan


More information about the cython-devel mailing list