25 Oct
2016
25 Oct
'16
9:19 p.m.
Antony Polukhin wrote:
I've heard rumors a long time ago that std::type_info has no method returning demngled name because that method will add dependency to <string> header for <typeinfo> header. So I prefer to depend on a minimal subset of headers.
type_info instances are generated by the compiler, so this header is a special case. Either way, the original request was for file/line info, right? const char* file() const can return NULL, int line() const can return 0 or -1, when not present. There's no need for optional here.