Boost serialization: archive “unsupported version” exception

后端 未结 2 919
执笔经年
执笔经年 2021-01-18 09:37

I\'ve got the exception \"unsupported version\" when I try to deserialize through a text archive some data previously serialized with a upper version of Boost (1.46

2条回答
  •  日久生厌
    2021-01-18 10:38

    Using text_archive ... I had a recent issue with this also. I recently upgraded boost from 1.67 to 1.72 on Windows, generated some data on Windows. When I ran the data on my Linux environment which is still on Boost 1.67, it throws not supported.

    The header for 1.67 looked like this

    22 serialization::archive 16
    

    and 1.72 looked like

    22 serialization::archive 17
    

    I changed 17 to 16 and it was happy for my use case.

提交回复
热议问题