From 813148ca51ed3c87716179c7a0dbf2ff47134eb5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 27 Feb 2020 07:59:40 +1100 Subject: [PATCH] introspection: add example __PRETTY_FUNCTION__ values --- introspection.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/introspection.hpp b/introspection.hpp index 41da873e..97df4def 100644 --- a/introspection.hpp +++ b/introspection.hpp @@ -33,8 +33,12 @@ namespace cruft { std::string_view pretty_function (__PRETTY_FUNCTION__); #ifdef __clang__ + // PRETTY_FUNCTION = std::string_view cruft::type_name() [T = std::__1::vector >] + std::string_view const prefix = "[T = "; #elif defined(__GNUC__) + // PRETTY_FUNCTION = "constexpr std::string_view cruft::type_name() [with T = std::__debug::vector; std::string_view = std::basic_string_view]" + std::string_view prefix = "[with T = "; #else #error "Unsupported compiler"