Skip to content

Commit

Permalink
fix "this" is null warning
Browse files Browse the repository at this point in the history
  • Loading branch information
profezzorn committed Dec 30, 2024
1 parent 0473f4f commit db8fdbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/stdout.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ template<typename T, typename X = void> struct PrintHelper {
static void out(Print& p, T& x) { p.print(x); }
};

template<typename T> struct PrintHelper<T, decltype(((T*)0)->printTo(*(Print*)0))> {
template<typename T> struct PrintHelper<T, decltype(std::declval<T*>()->printTo(*(Print*)0))> {
static void out(Print& p, T& x) { x.printTo(p); }
};

Expand Down

0 comments on commit db8fdbc

Please sign in to comment.