HuaHuaY commented on PR #3600: URL: https://github.com/apache/avro/pull/3600#issuecomment-3675362837
It seems like I'm running into another visibility related issue. The `GenericDatum` class uses `std::any value_;` to store some types, such as `GenericRecord`, and also provides a template method value, which internally calls `std::any_cast` to perform type conversion. My dynamic library calls `value<::avro::GenericRecord>`, and my dynamic library also provides an interface to receive a `GenericDatum`. I erase the visibility information in my dynamic library. Then my dynamic library internally stores a `GenericRecord`'s `typeinfo`. However, when a program using my dynamic library constructs a `GenericRecord` and passes it to me, `std::any_cast` will fail to convert the type due to inconsistency in typeinfo, even though both my library and avro are dynamic libraries. I have no ideas on how to solve this problem. -- 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]
