From dead6fe3bfef4dc13f3ac73e135f2e955748abc7 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 30 Apr 2020 07:00:05 +0200 Subject: [PATCH] Fix unresolved symbol issue introduced by recent OS X fixes. --- include/lol/private/base/string.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/lol/private/base/string.h b/include/lol/private/base/string.h index 42400b58..3bcf07c9 100644 --- a/include/lol/private/base/string.h +++ b/include/lol/private/base/string.h @@ -175,19 +175,17 @@ std::basic_string vformat(char const *fmt, va_list ap) return ret; } +// XXX: we cheat by setting the argument time to char instead of T, because +// I found no other way to use the printf attribute. template -std::basic_string format(T const *fmt, ...) +std::basic_string format(char const *fmt, ...) lol_attr_printf_format(1, 2) { va_list ap; va_start(ap, fmt); - std::string ret = vformat(fmt, ap); + std::basic_string ret = vformat(fmt, ap); va_end(ap); return ret; } -// Specialize for char so that we can declare the printf format attribute -template<> -std::basic_string format(char const *fmt, ...) lol_attr_printf_format(1, 2); - } // namespace lol