-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from bluescarni/pr/boost_s11n
(WIP) Support for Boost serialization
- Loading branch information
Showing
35 changed files
with
801 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _tutorial_boost_s11n: | ||
|
||
Boost.serialization support | ||
=========================== | ||
|
||
Starting from version 0.22, all of mp++'s multiprecision classes support (de)serialisation | ||
via the `Boost.serialization <https://www.boost.org/doc/libs/1_75_0/libs/serialization/doc/index.html>`_ | ||
library, provided that mp++ was compiled with the ``MPPP_WITH_BOOST_S11N`` option enabled | ||
(see the :ref:`installation instructions <installation>`). We refer to the documentation | ||
of Boost.serialization (particularly the | ||
`tutorial <https://www.boost.org/doc/libs/1_75_0/libs/serialization/doc/tutorial.html>`_) | ||
for usage examples. Note that, as detailed in the previous sections, | ||
certain classes (such as :cpp:class:`~mppp::integer` and | ||
:cpp:class:`~mppp::real`) also provide a separate, low-level binary serialisation API | ||
which does not depend on Boost.serialization. | ||
|
||
There is an important **caveat** to keep in mind when using mp++'s Boost.serialization support. | ||
The serialisation to/from binary archives is optimised for speed, and no checks are performed | ||
on the validity of the data that is loaded from a binary archive. In other words, a | ||
maliciously-crafted binary archive could lead to the creation of an invalid mp++ object | ||
whose use could then lead to undefined and/or erratic runtime behaviour. Users are thus | ||
advised not to load data from untrusted binary archives. Non-binary archives do not suffer from | ||
these issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.