I have attached a patch that adds a test case.
I think all the is_* tests suffer from a similar problem. They only
seem to examine the "outside" most type information and ignore the
For example, shouldn't is_float return true for a "const float" type?
Roman Yakovenko wrote:
> On 5/12/06, Allen Bierbaum <allenb@...> wrote:
>> I just ran into an annoyance that I had seen before bug forgot to post.
>> I am checking a return_type from a method to see if it is a const
>> reference and the type traits are not working well.
>> The problem is that is_const and is_reference only check the most
>> external portion of a composed type. So if you want to check if
>> something is really a const ref you have do write code something like
>> this (please correct me if I am wrong).
>> ret_type = method.return_type
>> is_ref = True in map(declarations.is_reference,
>> is_const = True in map(declarations.is_const,
>> is_const_ref = (is_ref and not is_const)
>> Boost type traits and other libraries like it automatically do the
>> decomposition so you could check a const reference type and it will
>> return true to both is_reference and is_const.
>> Is there any reason that we shouldn't make pygccxml work similarly?
> Yes. I did not have test case for this. If you can send me test case I
> will make
> sure it works as expected.
>> Using Tomcat but need to do more? Need to support web services,
>> Get stuff done quickly with pre-integrated technology to make your
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> pygccxml-development mailing list