Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nameof into boost::core::demangle.hpp #166

Open
gpeterhoff opened this issue Feb 7, 2024 · 2 comments
Open

add nameof into boost::core::demangle.hpp #166

gpeterhoff opened this issue Feb 7, 2024 · 2 comments

Comments

@gpeterhoff
Copy link

gpeterhoff commented Feb 7, 2024

#include <typeinfo>

namespace boost
{
namespace core
{
template <typename Type>
inline std::string	nameof()
{
	return demangle(typeid(Type).name());
}

}	//	core
}	//	boost

This saves a lot of manual fiddling around.

thx
Gero

@pdimov
Copy link
Member

pdimov commented Feb 7, 2024

See boost::core::type_name.

@gpeterhoff
Copy link
Author

Thank you. I overlooked that.

regards
Gero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants