From 62d5cebdb563b0cf5da61ad3e4d69b9feec39829 Mon Sep 17 00:00:00 2001 From: "Krinkin, Mike" Date: Fri, 8 Nov 2024 19:38:52 +0000 Subject: [PATCH] [contrib][postgres] Remove <> after constructor in the PG proxy code (#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 https://github.com/envoyproxy/envoy/issues/31807, but that issue is what started the investigation. Signed-off-by: Mikhail Krinkin --- .../postgres_proxy/filters/network/source/postgres_message.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/postgres_proxy/filters/network/source/postgres_message.h b/contrib/postgres_proxy/filters/network/source/postgres_message.h index 2dca99e6ee4d..0d7acbc719c0 100644 --- a/contrib/postgres_proxy/filters/network/source/postgres_message.h +++ b/contrib/postgres_proxy/filters/network/source/postgres_message.h @@ -394,7 +394,7 @@ template class Sequence 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&,