Enable FMT_STRING() use with types other than string literals

This commit is contained in:
Scott Ramsby
2020-03-24 12:56:21 -07:00
committed by Victor Zverovich
parent 69779b4ed6
commit 664dd88e31
3 changed files with 43 additions and 14 deletions
+3
View File
@@ -371,6 +371,9 @@ template <typename Char> class basic_string_view {
the size with ``std::char_traits<Char>::length``.
\endrst
*/
#if __cplusplus >= 201703L // C++17's char_traits::length() is constexpr.
FMT_CONSTEXPR
#endif
basic_string_view(const Char* s)
: data_(s), size_(std::char_traits<Char>::length(s)) {}