Skip to content

Commit

Permalink
(#15018) hazelcast-cpp-client: add version 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OzanCansel authored Jan 16, 2023
1 parent d369404 commit a498f41
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes/hazelcast-cpp-client/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"5.1.0":
url: "https://github.com/hazelcast/hazelcast-cpp-client/archive/v5.1.0.tar.gz"
sha256: "de22ddf2c99079ed2385baa554a997b15ae17b039d6d108f68e25e1b3bbf76b6"
"5.0.0":
url: "https://github.com/hazelcast/hazelcast-cpp-client/archive/v5.0.0.tar.gz"
sha256: "0df7948bc6f4d219c60f51179355599938cab5b713335c2ea48d1d38be1b69dc"
Expand All @@ -15,5 +18,11 @@ sources:
url: "https://github.com/hazelcast/hazelcast-cpp-client/archive/v4.0.1.zip"
sha256: "4b3c6a876ebca2a4dcf23a556d3c3d4da2284e4ce1d2bbdf335df7f86b03fd28"
patches:
"5.1.0":
- patch_file: "patches/gcc_11_1_0.patch"
patch_description: "Fix for GCC-111"
patch_type: "portability"
"4.1.0":
- patch_file: "patches/gcc_4.9_5_fix.patch"
patch_description: "Fix for GCC-495"
patch_type: "portability"
40 changes: 40 additions & 0 deletions recipes/hazelcast-cpp-client/all/patches/gcc_11_1_0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/hazelcast/include/hazelcast/client/protocol/ClientMessage.h b/hazelcast/include/hazelcast/client/protocol/ClientMessage.h
index 462ea85b0..f2686506a 100644
--- a/hazelcast/include/hazelcast/client/protocol/ClientMessage.h
+++ b/hazelcast/include/hazelcast/client/protocol/ClientMessage.h
@@ -190,6 +190,9 @@ struct HAZELCAST_API is_trivial_entry_vector<
*/
class HAZELCAST_API ClientMessage
{
+ template<typename T>
+ struct default_nullable_decoder;
+
public:
static constexpr size_t EXPECTED_DATA_BLOCK_SIZE = 1024;

@@ -974,10 +977,8 @@ public:
}

template<typename T>
- boost::optional<T> get_nullable(std::function<T(ClientMessage&)> decoder =
- [](ClientMessage& msg) {
- return msg.get<T>();
- })
+ boost::optional<T> get_nullable(
+ std::function<T(ClientMessage&)> decoder = default_nullable_decoder<T>{})
{
if (next_frame_is_null_frame()) {
// skip next frame with null flag
@@ -1357,6 +1358,12 @@ private:
static const frame_header_type BEGIN_FRAME;
static const frame_header_type END_FRAME;

+ template<typename T>
+ struct default_nullable_decoder
+ {
+ T operator()(ClientMessage& msg) const { return msg.get<T>(); }
+ };
+
template<typename T>
void set_primitive_vector(const std::vector<T>& values,
bool is_final = false)
2 changes: 2 additions & 0 deletions recipes/hazelcast-cpp-client/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"5.1.0":
folder: all
"5.0.0":
folder: all
"4.2.0":
Expand Down

0 comments on commit a498f41

Please sign in to comment.