standardese/cppast

Multidimensional array wrong to_string() representation

deadlocklogic opened this issue ยท 4 comments

Consider:

int array[][1];

Printing the type of this variable to output stream gives int[1][1]
What is wrong here?

By the way, @foonathan sorry for spamming the issue tracker, but I am trying to report pitfalls/possible bugs in order to improve this good library.
Thanks.

By the way, @foonathan sorry for spamming the issue tracker,

No problem, I just have no time to look into the issues right now. Feel free to report anything you find though, I'll get back to you in two weeks or so.

Well, two months is almost like two weeks :D Fixed now, thanks for reporting.

No problem! ๐Ÿ˜…
By the way, any plans for a libtooling backend? Or a better solution for template member specializations?
Knowing if a class is abstract or final etc... gives huge advantage when generating bindings.
Thanks!

By the way, any plans for a libtooling backend?

No, libtooling isn't really usable outside of clang's source tree and has frequent API changes.

Knowing if a class is abstract or final etc... gives huge advantage when generating bindings.

This is already supported.

final: https://github.com/foonathan/cppast/blob/e558e2d58f519e3a83af770d460672b1d4ba2886/include/cppast/cpp_class.hpp#L204

abstract: check whether it has a member which is pure virtual https://github.com/foonathan/cppast/blob/e558e2d58f519e3a83af770d460672b1d4ba2886/include/cppast/cpp_member_function.hpp#L43