qicosmos/iguana

xml test fail:Uncaught (in promise) RuntimeError: memory access out of bounds

sonygod opened this issue · 3 comments

platform: emscripten wasm

void test_xml()
{
    person p = {"admin", 20};
    iguana::string_stream ss;
    iguana::to_xml(ss, p);
    std::cout << ss << std::endl;

   
    ss.clear();
    two t = {"test", {2}, 4};
    iguana::to_xml(ss, t);

    

    std::cout << ss << std::endl;

    two t1;
    iguana::from_xml(t1, ss.data());//
    std::cout << t1.age << "\n";
    
}

iguana::from_xml(t1, ss.data());//will throw Uncaught (in promise) RuntimeError: memory access out of bounds

bbbgan commented

Is this the old version? iguana::xml has been refactored recently. Can you give it a try?
However, it is based on C++20, The support for C++17 is In the plan

bbbgan commented
bbbgan commented

I am planing to resolve these conflicts while supporting 17, and if necessary, you can also resolve these conflicts yourself. If you want me to solve it, it's also my pleasure