Tyooughtul commented on code in PR #3381:
URL: https://github.com/apache/fory/pull/3381#discussion_r2833304175


##########
docs/guide/cpp/field-configuration.md:
##########
@@ -225,7 +225,7 @@ int main() {
   doc.description = "A sample document";
   doc.metadata = nullptr;  // Allowed because nullable
   doc.parent = std::make_shared<Document>();
-  doc.parent->title = "Parent Doc";
+  doc.parent.get()->title = "Parent Doc";

Review Comment:
   I think fory::field<std::shared_ptr<T>>::operator->() returns a pointer to 
the shared_ptr itself, not to T . Using .get() gives us the shared_ptr 
reference, and then -> properly accesses the underlying object.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to