-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hazelcast-cpp-client: add version 5.1.0 #15018
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should contribute this back upstream to the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean previous versions at conan or the hazelcast/hazelcast-cpp-client repo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To hazelcast/hazelcast-cpp-client repo :)