This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch 0.21.0
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/0.21.0 by this push:
     new 3867d6832 THRIFT-5816 Fix UUID for boost 1.86.0 (change in {{data}} 
member usage) client: cpp Patch: Carel Combrink
3867d6832 is described below

commit 3867d6832e271adcd3111c3068efc9c11cb9cf63
Author: Carel Combrink <[email protected]>
AuthorDate: Tue Sep 3 22:01:48 2024 +0200

    THRIFT-5816 Fix UUID for boost 1.86.0 (change in {{data}} member usage)
    client: cpp
    Patch: Carel Combrink
    
    This closes #3035
---
 lib/c_glib/test/testthrifttestclient.cpp     | 4 ++--
 lib/c_glib/test/testthrifttestzlibclient.cpp | 4 ++--
 lib/cpp/src/thrift/TUuid.cpp                 | 2 +-
 lib/cpp/src/thrift/TUuid.h                   | 2 +-
 lib/cpp/test/TUuidTest.cpp                   | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/c_glib/test/testthrifttestclient.cpp 
b/lib/c_glib/test/testthrifttestclient.cpp
index 77cd24a8f..513f0712b 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -112,8 +112,8 @@ class TestHandler : public ThriftTestIf {
     out = thing;
   }
 
-  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 {
+    cout << "[C -> C++] testUuid(\"" << thing << "\")" << '\n';
     return thing;
   }
 
diff --git a/lib/c_glib/test/testthrifttestzlibclient.cpp 
b/lib/c_glib/test/testthrifttestzlibclient.cpp
index 7c0f24a5e..dbcd64e76 100644
--- a/lib/c_glib/test/testthrifttestzlibclient.cpp
+++ b/lib/c_glib/test/testthrifttestzlibclient.cpp
@@ -107,8 +107,8 @@ class TestHandler : public ThriftTestIf {
     out = thing;
   }
 
-  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 {
+    cout << "[C -> C++] testUuid(\"" << thing << "\")" << '\n';
     return thing;
   }
 
diff --git a/lib/cpp/src/thrift/TUuid.cpp b/lib/cpp/src/thrift/TUuid.cpp
index a0c45f9de..062b286d8 100644
--- a/lib/cpp/src/thrift/TUuid.cpp
+++ b/lib/cpp/src/thrift/TUuid.cpp
@@ -37,7 +37,7 @@ TUuid::TUuid(const std::string& str) noexcept {
   }
 
   try {
-    const boost::uuids::uuid uuid{gen(str)};
+    const boost::uuids::uuid uuid = gen(str);
     std::copy(uuid.begin(), uuid.end(), this->begin());
   } catch (const std::runtime_error&) {
     // Invalid string most probably
diff --git a/lib/cpp/src/thrift/TUuid.h b/lib/cpp/src/thrift/TUuid.h
index aa69c673d..405772aed 100644
--- a/lib/cpp/src/thrift/TUuid.h
+++ b/lib/cpp/src/thrift/TUuid.h
@@ -90,7 +90,7 @@ public:
   #endif // THRIFT_TUUID_BOOST_CONSTRUCTOR_EXPLICIT
   TUuid(const boost::uuids::uuid& buuid) noexcept
   {
-    std::copy(std::begin(buuid.data), std::end(buuid.data), 
std::begin(this->data_));
+    std::copy(buuid.begin(), buuid.end(), std::begin(this->data_));
   }
 #endif // THRIFT_TUUID_SUPPORT_BOOST_UUID
 
diff --git a/lib/cpp/test/TUuidTest.cpp b/lib/cpp/test/TUuidTest.cpp
index 4a521cf50..d2a661581 100644
--- a/lib/cpp/test/TUuidTest.cpp
+++ b/lib/cpp/test/TUuidTest.cpp
@@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(into_boost_uuid) {
 
 BOOST_AUTO_TEST_CASE(from_boost_uuid) {
   static boost::uuids::string_generator gen;
-  boost::uuids::uuid boost_uuid{gen("1f610073-db33-4d21-adf2-75460d4955cc")};
+  boost::uuids::uuid boost_uuid = gen("1f610073-db33-4d21-adf2-75460d4955cc");
   BOOST_TEST(!boost_uuid.is_nil());
   TUuid uuid;
   BOOST_TEST(uuid.is_nil());
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(test_character_buffer) {
 BOOST_AUTO_TEST_CASE(test_boost_buffer) {
 
   static boost::uuids::string_generator gen;
-  boost::uuids::uuid boost_uuid{gen("1f610073-db33-4d21-adf2-75460d4955cc")};
+  boost::uuids::uuid boost_uuid = gen("1f610073-db33-4d21-adf2-75460d4955cc");
   BOOST_TEST(!boost_uuid.is_nil());
 
   const TUuid uuid{boost_uuid.data};

Reply via email to