On Sun, Jun 29, 2008 at 7:03 PM, Gustavo Carneiro <gjc...@gm...> wrote:
> I have a function[1] that extracts properties from a type, using
> pygccxml.declarations.type_traits
>
> For a simple type, it does nothing, and the type name is unchanged. All is
> well here:
>
> ***** type traits for '::uint64_t'
> *** > return ('uint64_t', False, 0, False)
>
>
> In the following case, I call type_traits.remove_const and
> type_traits.remove_reference, and the resulting type then appears different:
>
> ***** type traits for '::uint64_t const &'
> *** > return ('long unsigned int', True, 0, True)
>
> Yes, I know that in this system "long unsigned int" is the same as
> uint64_t. But I would rather work with uint64_t, due to LLP/LP platform
> differences.
>
> Any hints on how to work around this?
Yes. You can improve the function. The first thing the current
implementation does - it removes "typedef"'s, it simplifies a lot.
Almost all functions in type_traits implemented this way.
I am a little bit busy these days, if you can wait, I will take a look
on it. If not the patch is welcome.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|