Skip to content

Commit

Permalink
Fix string_view detection with libstdc++ (fmtlib#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Sep 2, 2020
1 parent 6cccdc2 commit dd0360d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
(defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
# include <string_view>
# define FMT_USE_STRING_VIEW
// libstdc++ supports experimental/string_view in c++14
#elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L
# include <experimental/string_view>
# define FMT_USE_EXPERIMENTAL_STRING_VIEW
Expand Down Expand Up @@ -846,11 +847,10 @@ template <typename T = char> class counting_buffer : public buffer<T> {
template <typename T>
class buffer_appender : public std::back_insert_iterator<buffer<T>> {
using base = std::back_insert_iterator<buffer<T>>;

public:
explicit buffer_appender(buffer<T>& buf)
: base(buf) {}
buffer_appender(base it)
: base(it) {}
explicit buffer_appender(buffer<T>& buf) : base(buf) {}
buffer_appender(base it) : base(it) {}

buffer_appender& operator++() {
base::operator++();
Expand Down

0 comments on commit dd0360d

Please sign in to comment.