Enable FMT_STRING() use with types other than string literals
This commit is contained in:
committed by
Victor Zverovich
parent
69779b4ed6
commit
664dd88e31
@@ -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)) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user