Profile directory About Mobile apps
Log in Sign up
glaebhoerl @glaebhoerl@schelling.pt

...that's definitely one of the more cursed things I've ever seen in C++. Apparently the __PRETTY_FUNCTION__ macro is expanded *after* template instantiation.
https://discuss.systems/@tobinbaker/111389666037676146

Tobin Baker (@tobinbaker@discuss.systems)

Background: this is motivated by compile-time 32-bit type ID extraction for template types. Here's the best I have so far (relies on GCC __PRETTY_FUNCTION__ macro…

discuss.systems
November 12, 2023 at 8:35 PM · · 1 · 0 · 0
Nov 12, 2023
Tobin Baker @tobinbaker@discuss.systems

@glaebhoerl yup, highly magical

btw here's a more principled and portable approach to compile-time type info: https://github.com/Manu343726/ctti

GitHub - Manu343726/ctti: Compile Time Type Information for C++

Compile Time Type Information for C++. Contribute to Manu343726/ctti development by creating an account on GitHub.

GitHub
0
Sign in to participate in the conversation
Mastodon

a Schelling point for those who seek one

Trending now

#esc23 people talking
75
#eurovision58 people talking
167
#caturday28 people talking
32

Resources

  • Terms of service
  • Privacy policy

Developers

  • Documentation
  • API

What is Mastodon?

schelling.pt

  • About
  • v3.5.3

More…

  • Source code
  • Mobile apps
v3.5.3 · Privacy policy