Remove "class " and "typename " from type_name

Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
Mm2PL 2024-10-01 13:39:22 +02:00
parent 8d0d91f279
commit ad4a0db6c3
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -28,6 +28,15 @@ constexpr auto type_name()
name.remove_prefix(prefix.size());
name.remove_suffix(suffix.size());
if (name.starts_with("class "))
{
name.remove_prefix(6);
}
if (name.starts_with("struct "))
{
name.remove_prefix(7);
}
return name;
}