core icon indicating copy to clipboard operation
core copied to clipboard

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

Open gpeterhoff opened this issue 1 year ago • 2 comments

#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

gpeterhoff avatar Feb 07 '24 19:02 gpeterhoff

See boost::core::type_name.

pdimov avatar Feb 07 '24 19:02 pdimov

Thank you. I overlooked that.

regards Gero

gpeterhoff avatar Feb 07 '24 20:02 gpeterhoff