entt icon indicating copy to clipboard operation
entt copied to clipboard

Use `std::source_location::function_name()` for getting the name of a type in C++20 mode

Open n0F4x opened this issue 3 months ago • 1 comments

I recently noticed that you can use std::source_location::function_name() for getting the name of a type. I didn't test it. Reference: https://github.com/qlibs/reflect/

This is a more standard way of acquiring a type_name. Just wanted to put this out here.

n0F4x avatar Sep 24 '25 22:09 n0F4x

It's a C++20 way to do that, while EnTT is still on C++17. It should move to C++20 after the next release though. Just keep the issue around until then, and experiment with the new function when it's done. 👍

skypjack avatar Sep 29 '25 13:09 skypjack