diff --git a/backward.hpp b/backward.hpp index 670aa45..b7f091c 100644 --- a/backward.hpp +++ b/backward.hpp @@ -4051,8 +4051,8 @@ class Printer { TraceResolver _resolver; SnippetFactory _snippets; - template - void print_stacktrace(ST &st, std::ostream &os, Colorize &colorize) { + template + void print_stacktrace(ST &st, Ostream &os, Colorize &colorize) { print_header(os, st.thread_id()); _resolver.load_stacktrace(st); if ( reverse ) { @@ -4066,8 +4066,8 @@ class Printer { } } - template - void print_stacktrace(IT begin, IT end, std::ostream &os, size_t thread_id, + template + void print_stacktrace(IT begin, IT end, Ostream &os, size_t thread_id, Colorize &colorize) { print_header(os, thread_id); for (; begin != end; ++begin) { @@ -4075,7 +4075,8 @@ class Printer { } } - void print_header(std::ostream &os, size_t thread_id) { + template + void print_header(Ostream &os, size_t thread_id) { os << "Stack trace (most recent call last)"; if (thread_id) { os << " in thread " << thread_id; @@ -4083,7 +4084,8 @@ class Printer { os << ":\n"; } - void print_trace(std::ostream &os, const ResolvedTrace &trace, + template + void print_trace(Ostream &os, const ResolvedTrace &trace, Colorize &colorize) { os << "#" << std::left << std::setw(2) << trace.idx << std::right; bool already_indented = true; @@ -4121,7 +4123,8 @@ class Printer { } } - void print_snippet(std::ostream &os, const char *indent, + template + void print_snippet(Ostream &os, const char *indent, const ResolvedTrace::SourceLoc &source_loc, Colorize &colorize, Color::type color_code, int context_size) { @@ -4145,7 +4148,8 @@ class Printer { } } - void print_source_loc(std::ostream &os, const char *indent, + template + void print_source_loc(Ostream &os, const char *indent, const ResolvedTrace::SourceLoc &source_loc, void *addr = nullptr) { os << indent << "Source \"" << source_loc.filename << "\", line "