THRIFT-5816: Fix UUID for boost 1.86.0 (change in {{data}} member usage)#3035
THRIFT-5816: Fix UUID for boost 1.86.0 (change in {{data}} member usage)#3035CJCombrink wants to merge 3 commits intoapache:masterfrom
Conversation
- Not sure why I am seeing this only now
- Appears to break in older compilers
- Accessing the data member directly is discouraged - Iterate through the uuid type instead
|
@Jens-G |
client: cpp Patch: Carel Combrink This closes #3035
|
|
||
| std::string testUuid(const std::string thing) override { | ||
| cout << "[C -> C++] testUuid(\"" << std::hex << thing << "\")" << '\n'; | ||
| apache::thrift::TUuid testUuid(const apache::thrift::TUuid thing) override { |
There was a problem hiding this comment.
If you use const ref on the parameter and return value instead, it avoids copies.
There was a problem hiding this comment.
Unfortunately thirft generates the interface with a copy. Perhaps it is something I missed when I added the new type because I see the other functions uses const ref on some arguments
There was a problem hiding this comment.
@Jens-G Should I create a ticket for this and fix asap?
It would change how the method is generated if I change it to be a reference:
It appears to change to
virtual void testUuid(apache::thrift::TUuid& _return, const apache::thrift::TUuid& thing) = 0;
but I can't work on this more at this moment, probably only tonight again
|
|
||
| std::string testUuid(const std::string thing) override { | ||
| cout << "[C -> C++] testUuid(\"" << std::hex << thing << "\")" << '\n'; | ||
| apache::thrift::TUuid testUuid(const apache::thrift::TUuid thing) override { |
There was a problem hiding this comment.
If you use const ref on the parameter and return value instead, it avoids copies.
Tries to fix compiler issues with latest boost (1.86)
THRIFT-5816
[skip ci]anywhere in the commit message to free up build resources.