philippeVerney commented on code in PR #3545:
URL: https://github.com/apache/avro/pull/3545#discussion_r2522496685


##########
lang/c++/include/avro/Specific.hh:
##########
@@ -165,6 +166,44 @@ struct codec_traits<double> {
     }
 };
 
+/**
+* codec_traits for Avro optional.
+*/
+template<typename T>
+struct codec_traits<std::optional<T>> {
+    /**
+       * Encodes a given value.
+       */
+    static void encode(Encoder &e, const std::optional<T> &b) {

Review Comment:
   I add this remark in a comment not to lost it. Thanks.
   Could you give me another schema example of an AVRO optional please.
   I have some "optional" as `["null", U, V, T, ...]` but I map them to 
`std::variant` for now (other PR to come maybe)



-- 
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]

Reply via email to