Skip to content

Commit

Permalink
[contrib][postgres] Remove <> after constructor in the PG proxy code (#…
Browse files Browse the repository at this point in the history
…37038)

Angle brackets are not required after constructor and, maybe, aren't
even correct, though I'm not 100% sure on what the standard says on the
matter.

It seems like clang is fine with this syntax, but when you try to build
Envoy with gcc it complains:

```
./contrib/postgres_proxy/filters/network/source/postgres_message.h: At global scope:
./contrib/postgres_proxy/filters/network/source/postgres_message.h:397:14: error: expected unqualified-id before ')' token
  397 |   Sequence<>() = default;
      |              ^
Target //contrib/exe:envoy-static failed to build
```

Given that it's at least unusual to have angle brackets after
constructor in a class template specialization let's remove them and
satisfy both gcc and clang.

It's one of the issue that prevent contrib build with gcc. It's not the
original issue reported in
#31807, but that issue is what
started the investigation.



Signed-off-by: Mikhail Krinkin <[email protected]>
  • Loading branch information
krinkinmu authored Nov 8, 2024
1 parent c3d9d92 commit 62d5ceb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ template <typename FirstField, typename... Remaining> class Sequence<FirstField,
// Terminal template definition for variadic Sequence template.
template <> class Sequence<> {
public:
Sequence<>() = default;
Sequence() = default;
std::string toString() const { return ""; }
bool read(const Buffer::Instance&, uint64_t&, uint64_t&) { return true; }
Message::ValidationResult validate(const Buffer::Instance&, const uint64_t, uint64_t&,
Expand Down

0 comments on commit 62d5ceb

Please sign in to comment.