Skip to content

Commit

Permalink
Fix GCC comnpilation
Browse files Browse the repository at this point in the history
Signed-off-by: Itamar Kaminski <itamark@google.com>
  • Loading branch information
itamarkam committed Jan 13, 2021
1 parent deea2c6 commit 23e22ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/common/formatter/substitution_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ class FormatterImpl : public Formatter {
std::vector<FormatterProviderPtr> providers_;
};

// Helper classes for StructFormatter::StructFormatMapVisitor.
template <class... Ts> struct StructFormatMapVisitorHelper : Ts... { using Ts::operator()...; };
template <class... Ts> StructFormatMapVisitorHelper(Ts...) -> StructFormatMapVisitorHelper<Ts...>;

/**
* An formatter for structured log formats, which returns a Struct proto that
* can be converted easily into multiple formats.
Expand Down Expand Up @@ -158,8 +162,6 @@ class StructFormatter {
StructFormatListPtr value_;
};

template <class... Ts> struct StructFormatMapVisitorHelper : Ts... { using Ts::operator()...; };
template <class... Ts> StructFormatMapVisitorHelper(Ts...) -> StructFormatMapVisitorHelper<Ts...>;
using StructFormatMapVisitor = StructFormatMapVisitorHelper<
const std::function<ProtobufWkt::Value(const std::vector<FormatterProviderPtr>&)>,
const std::function<ProtobufWkt::Value(const StructFormatter::StructFormatMapWrapper&)>,
Expand Down

0 comments on commit 23e22ef

Please sign in to comment.