From dd0360d34a6fcfa5a240b6374d87af96e3f5cfb2 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Wed, 2 Sep 2020 12:10:40 +1000 Subject: [PATCH] Fix string_view detection with libstdc++ (#1850) --- include/fmt/core.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index d2c9633c..d7f3d726 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -231,6 +231,7 @@ (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) # include # define FMT_USE_STRING_VIEW +// libstdc++ supports experimental/string_view in c++14 #elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L # include # define FMT_USE_EXPERIMENTAL_STRING_VIEW @@ -846,11 +847,10 @@ template class counting_buffer : public buffer { template class buffer_appender : public std::back_insert_iterator> { using base = std::back_insert_iterator>; + public: - explicit buffer_appender(buffer& buf) - : base(buf) {} - buffer_appender(base it) - : base(it) {} + explicit buffer_appender(buffer& buf) : base(buf) {} + buffer_appender(base it) : base(it) {} buffer_appender& operator++() { base::operator++();