Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full_type_id() to yield fully-qualified type name #2651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhaschke
Copy link
Contributor

I found it handy for debugging to print the fully qualified type name, including reference specifiers.
This code originates from https://stackoverflow.com/questions/81870/is-it-possible-to-print-a-variables-type-in-standard-c

@YannickJadoul
Copy link
Collaborator

YannickJadoul commented Nov 11, 2020

I'm not sure adding a dead code, for debugging purposes only, is a great idea from a maintenance point of view.

(Also, pybind11 currently seems to be using west-side const. Let's not get into that discussion, but this would be inconsistent.)

@rhaschke
Copy link
Contributor Author

Understandable. Nevertheless, using full_type_id() instead of type_id() might become handy in some existing unit tests or debug outputs of pybind11 as well, particularly if the reference specifiers are relevant.
But don't mind to reject this PR. I just wanted to propose it, because I have it lying around.

@YannickJadoul
Copy link
Collaborator

Just my two cents, though. Others can chime in.

If this is would actually be used somewhere, that's a different story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants