Skip to content

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

@n0F4x

Description

@n0F4x

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.

Metadata

Metadata

Assignees

Labels

enhancementaccepted requests, sooner or later I'll do it

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions