[C++-sig] pygccxml not picking up optional parameters in std::vector constructor

Roman Yakovenko roman.yakovenko at gmail.com
Fri Dec 28 09:39:24 CET 2007


On Dec 28, 2007 1:16 AM, Nindi Singh <nindi73 at yahoo.co.uk> wrote:
> I am using pygccxml to parse C++ code and it all is working like a dream but for one thing.
>
> When I explicitly instantiate std::vector«double,std::allocator«double» »
>
> pygccxml doesn't seem to pick up the default parameters in the constructors.
>
> Specifically,  I am using libstdc++ from gnu, one of the constructors for std::vector has the following signature
>
>
>
>
>
> explicit       vector(size_type __n,
>
>                     const value_type& __value = value_type(),
>
>                                    const allocator_type& __a = allocator_type())
>
>
>
> So I expect calldef_t.required_args to be size_type ( or whatever it actualy is)
>
> and expect calldef_t.optional_args to be the other 2. This, however is not the case, I see all
>
> arguments as being in calldef_t.required_args. I cannot on the other hand reproduce this
>
> behaviour for my own classes, there it works as expected.
>
>
>
> Any suggestions or enlightenment would be greatly aprieciated.
>


You didn't specified the versions (std & gccxml) you use. GCC-XML
sometimes replace std headers with its own implementation. May be it
replaced the vector file and doesn't specify default arguments.

You can find replaced header files under GCC-XML installed directory.

HTH
-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list