Browse Source

Fix g++ compilation on OS X Catalina.

pull/1/head
Sam Hocevar 4 years ago
parent
commit
93ad6b7ab1
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      include/lol/private/base/string.h

+ 6
- 2
include/lol/private/base/string.h View File

@@ -175,7 +175,7 @@ std::basic_string<T> vformat(char const *fmt, va_list ap)
return ret;
}

template<typename T = char> lol_attr_printf_format(1, 2)
template<typename T = char>
std::basic_string<T> format(T const *fmt, ...)
{
va_list ap;
@@ -185,5 +185,9 @@ std::basic_string<T> format(T const *fmt, ...)
return ret;
}

} /* namespace lol */
// Specialize for char so that we can declare the printf format attribute
template<>
std::basic_string<char> format(char const *fmt, ...) lol_attr_printf_format(1, 2);

} // namespace lol


Loading…
Cancel
Save