ruoruoniao opened a new issue, #3727:
URL: https://github.com/apache/fory/issues/3727

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fory/issues) 
and found no similar issues.
   
   
   ### Version
   
   Compiler MSVC/C++ 17
   Fory commit: f15637478
   
   ### Component(s)
   
   C++
   
   ### Minimal reproduce step
   
   ```cpp
   struct MapsInStruct {
     std::map<int, std::string> map{};
     std::unordered_map<std::string, std::string> unordered_map{};
   
     auto operator==(const MapsInStruct &rhs) const -> bool {
         return map == rhs.map && unordered_map == rhs.unordered_map;
     }
   
     FORY_STRUCT(MapsInStruct, map, unordered_map);
   };
   
   TEST(MapSerializerTest, UnorderedMapInStruct) {
     MapsInStruct original{};
     original.map[1] = "1";
     original.map[2] = "2";
     original.unordered_map["1"] = "2";
     original.unordered_map["2"] = "2";
   
     // Create Fory instance with default config
     auto fory = Fory::builder().xlang(true).compatible(true).build();
   
     fory.register_struct<MapsInStruct>(0);
   
     // Serialize
     auto serialize_result = fory.serialize(original);
     ASSERT_TRUE(serialize_result.ok())
         << "Serialization failed: " << serialize_result.error().message();
     auto bytes = serialize_result.value();
   
     // Deserialize
     auto deserialize_result = fory.deserialize<MapsInStruct>(bytes.data(), 
bytes.size());
     ASSERT_TRUE(deserialize_result.ok())
         << "Deserialization failed: " << deserialize_result.error().message();
     auto deserialized = deserialize_result.value();
   
     // Compare
     EXPECT_EQ(original, deserialized);
   }
   ```
   Compile it.
   
   ### What did you expect to see?
   
   Compile as normal.
   
   ### What did you see instead?
   
   
   This code fails to compile. The error message is:
   error C2660: 
"fory::serialization::Serializer<fory::serialization::detail::CompileTimeFieldHelpers<T>::field_needs_type_info_in_compatible::FieldType,void>::write":
 function does not take 5 arguments
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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