Boost logo

Boost Users :

From: Kai Benndorf (kai.benndorf_at_[hidden])
Date: 2020-06-25 08:18:51


I found a workaround myself.

Our own archive was derived from e.g. boost::archive::text_iarchive_impl.
If I add the following code to its constructor it works again:

    if(0 == (flags & boost::archive::archive_flags::no_header))
         init();

I found this code in the text_iarchive class, which is derived from
text_iarchive_impl, what looks strange to me.

Is this a bug or should I use another class to derive our own archives from?

Best regards

Kai

> -----Ursprüngliche Nachricht-----
> Von: Boost-users <boost-users-bounces_at_[hidden]> Im Auftrag von Kai
> Benndorf via Boost-users
> Gesendet: Mittwoch, 24. Juni 2020 15:10
> An: boost-users_at_[hidden]
> Cc: Kai Benndorf <kai.benndorf_at_[hidden]>
> Betreff: [Boost-users] [serialization] Backward compatibility problem with
> 1:73
>
> Hi all,
>
> we are using boost serialization for writing and reading data and just
> switched from boost 1:67 to boost 1:73.
> We now cannot read back the data written with boost 1:67 or prior. We get
> an
> archive_exception::input_stream_error exception.
>
> Examining the files shows the difference. The old files are starting with
>
> 22 serialization::archive 16
>
> The new files are missing this data. Removing it from the files enabled
> the
> reading with boost 1:73.
>
> But strangely, if trying a small example program (the gps example from the
> documentation) also boost 1:73 produces this data:
> 22 serialization::archive 18
>
> Any idea what has changed in between these versions and could cause this
> problem? Thanks in advance for any hint.
>
> Our application uses an own derived archive class. Maybe I have to changed
> something there?
>
> Best regards
>
> Kai Benndorf
>
>
> ----------------------------------------------------------------
> Kai Benndorf E-Mail: kai.benndorf_at_[hidden]
> Zur Maibolte 44 MOBILE: 0151 55627946
> 32657 Lemgo WORK: 05251 150623
> Germany PHONE: 05261 14465
> ----------------------------------------------------------------
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net