-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#15018) hazelcast-cpp-client: add version 5.1.0
- Loading branch information
1 parent
d369404
commit a498f41
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": | ||
|