diff --git a/include/boost/core/type_name.hpp b/include/boost/core/type_name.hpp index 8e332e8..d873df1 100644 --- a/include/boost/core/type_name.hpp +++ b/include/boost/core/type_name.hpp @@ -267,6 +267,27 @@ template std::string type_name( tn_identity, std::string const& suff return typeid_name() + suffix; } +// integrals + +inline std::string type_name( tn_identity, std::string const& suffix ) +{ + return "unsigned" + suffix; +} + +#if defined(_MSC_VER) + +inline std::string type_name( tn_identity, std::string const& suffix ) +{ + return "long long" + suffix; +} + +inline std::string type_name( tn_identity, std::string const& suffix ) +{ + return "unsigned long long" + suffix; +} + +#endif + // cv #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900 diff --git a/test/type_name_test.cpp b/test/type_name_test.cpp index 437c0c3..4c60fda 100644 --- a/test/type_name_test.cpp +++ b/test/type_name_test.cpp @@ -67,7 +67,42 @@ struct Ch int main() { + TEST(signed char); + TEST(unsigned char); + TEST(short); + TEST(unsigned short); TEST(int); + TEST(unsigned); + TEST(long); + TEST(unsigned long); + TEST(long long); + TEST(unsigned long long); + + TEST(char); + TEST(wchar_t); +#if !defined(BOOST_NO_CXX11_CHAR16_T) + TEST(char16_t); +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + TEST(char32_t); +#endif +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + TEST(char8_t); +#endif +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L + TEST(std::byte); +#endif + + TEST(bool); + + TEST(float); + TEST(double); + TEST(long double); + + TEST(void); + TEST(void const); + TEST(void volatile); + TEST(void const volatile); TEST(A); TEST(B); @@ -94,11 +129,6 @@ int main() #endif - TEST(void); - TEST(void const); - TEST(void volatile); - TEST(void const volatile); - TEST(A*); TEST(B const* volatile*);