THRIFT-5816 Fix UUID for boost 1.86.0 (change in {{data}} member usage)
client: cpp
Patch: Carel Combrink

This closes #3035
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index 77cd24a..513f071 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -112,8 +112,8 @@
     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 7c0f24a..dbcd64e 100644
--- a/lib/c_glib/test/testthrifttestzlibclient.cpp
+++ b/lib/c_glib/test/testthrifttestzlibclient.cpp
@@ -107,8 +107,8 @@
     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 a0c45f9..062b286 100644
--- a/lib/cpp/src/thrift/TUuid.cpp
+++ b/lib/cpp/src/thrift/TUuid.cpp
@@ -37,7 +37,7 @@
   }
 
   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 aa69c67..405772a 100644
--- a/lib/cpp/src/thrift/TUuid.h
+++ b/lib/cpp/src/thrift/TUuid.h
@@ -90,7 +90,7 @@
   #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 4a521cf..d2a6615 100644
--- a/lib/cpp/test/TUuidTest.cpp
+++ b/lib/cpp/test/TUuidTest.cpp
@@ -122,7 +122,7 @@
 
 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_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};