From 10c7f89351f157c8149578853400d7f95b5e81dc Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 9 Sep 2018 08:13:06 -0700 Subject: [PATCH] Optimize format string processing on dumb compilers --- include/fmt/core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index e4f7d1e0..aec66c44 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -283,7 +283,7 @@ class basic_string_view { template FMT_CONSTEXPR basic_string_view( const std::basic_string &s) FMT_NOEXCEPT - : data_(s.c_str()), size_(s.size()) {} + : data_(s.data()), size_(s.size()) {} FMT_CONSTEXPR basic_string_view(type s) FMT_NOEXCEPT : data_(s.data()), size_(s.size()) {} @@ -1300,8 +1300,8 @@ struct is_compile_string : std::integral_constant::value> {}; template -typename std::enable_if::value>::type - check_format_string(S) {} +inline typename std::enable_if::value>::type + check_format_string(const S &) {} template typename std::enable_if::value>::type check_format_string(S);