On 25/05/11 09:31, Rémi LACROIX wrote:
> De : Rémi LACROIX
> Envoyé : mardi 24 mai 2011 12:58
> À : 'swig-user@...'
> Objet : [Swig 2.0.4 / Python] Templating std::pair of const pointers generates invalid code
>
>> Hello,
>
>> I am trying to template an std::pair of const pointers but Swig seems to generate invalid code.
>
>> I tried a simpler example to understand what was going on and it seems I can template without problem
>> std::pair< const int*, int*> or std::pair< int*, const int*> but when templating std::pair< const int*,
>> const int*> the compilation of the code generated by Swig fails with messages like: "type_name' is not
>> member of 'swig::traits<Type>'".
>
>> I think my problem may be similar to the one which was fixed by revision 11704 ("Fix std::vector of const
>> pointers").
>
>> Any help to fix this problem will be greatly appreciated !
>
>> RL
>
> Hello,
>
> I have found a workaround for my compilation problem but I am not quite sure whether it is the good way to fix the problem or not.
>
> I have attached the diff for the file I modified "std/std_pair.i".
>
I think something like this is needed. Please add it as a patch in the
SourceForge tracker for possible inclusion in the next release.
William
|