diff options
Diffstat (limited to 'src/compat/nullpo.hpp')
-rw-r--r-- | src/compat/nullpo.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compat/nullpo.hpp b/src/compat/nullpo.hpp index 5be674a..38c8e92 100644 --- a/src/compat/nullpo.hpp +++ b/src/compat/nullpo.hpp @@ -52,13 +52,15 @@ bool nullpo_chk(const char *file, int line, const char *func, const void *target); template<class T> -bool nullpo_chk(const char *file, int line, const char *func, T target) -{ - return nullpo_chk(file, line, func, target.operator->()); -} +bool nullpo_chk(const char *, int, const char *, Borrowed<T>) = delete; template<class T> bool nullpo_chk(const char *file, int line, const char *func, T *target) { return nullpo_chk(file, line, func, static_cast<const void *>(target)); } +template<class T> +bool nullpo_chk(const char *file, int line, const char *func, T target) +{ + return nullpo_chk(file, line, func, target.operator->()); +} } // namespace tmwa |