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);