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

Error: use of undeclared identifier 'name_of' #117

Closed
retroandchill opened this issue Nov 19, 2024 · 1 comment
Closed

Error: use of undeclared identifier 'name_of' #117

retroandchill opened this issue Nov 19, 2024 · 1 comment

Comments

@retroandchill
Copy link

Describe the bug
I can't use any of the name_of/display_name_of/etc. functions in compiler explorer.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the following example: https://godbolt.org/z/zK734b9Mo
  2. Observe that it doesn't compile

Expected behavior
It should compile and should print out the names.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Browser: Chrome

Additional context
I've also tried prefixing them with std::meta, with the same results.

@YiRanMushroom
Copy link

You need to use display_string_of instead of name_of. Some names of the meta functions changed. I recommend checking https://github.com/bloomberg/clang-p2996/blob/p2996/libcxx/include/experimental/meta for exact function signatures.

@katzdm katzdm closed this as completed Jan 8, 2025
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

No branches or pull requests

3 participants