Use `std::source_location::function_name()` for getting the name of a type in C++20 mode
Author: n0F4xCreated Sep 24, 2025Updated Sep 29, 2025
Labelsenhancement
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.
Source: skypjack/entt