piranha  0.10
Public Member Functions | List of all members
piranha::boost_load_impl< Archive, mp_rational< SSize >, mp_rational_boost_load_enabler< Archive, SSize > > Struct Template Reference

Specialisation of piranha::boost_load() for piranha::mp_rational. More...

#include <piranha/mp_rational.hpp>

Inheritance diagram for piranha::boost_load_impl< Archive, mp_rational< SSize >, mp_rational_boost_load_enabler< Archive, SSize > >:
Inheritance graph
[legend]
Collaboration diagram for piranha::boost_load_impl< Archive, mp_rational< SSize >, mp_rational_boost_load_enabler< Archive, SSize > >:
Collaboration graph
[legend]

Public Member Functions

void operator() (Archive &ar, mp_rational< SSize > &x) const
 Call operator. More...
 

Detailed Description

template<typename Archive, std::size_t SSize>
struct piranha::boost_load_impl< Archive, mp_rational< SSize >, mp_rational_boost_load_enabler< Archive, SSize > >

Specialisation of piranha::boost_load() for piranha::mp_rational.

Note
This specialisation is enabled only if the numerator/denominator type of piranha::mp_rational satisfies piranha::has_boost_load.

If Archive is boost::archive::binary_iarchive, the serialized numerator/denominator pair is loaded as-is, without canonicality checks. Otherwise, the rational will be canonicalised after deserialization.

Exceptions
unspecifiedany exception thrown by piranha::boost_load() or by the constructor of piranha::mp_rational from numerator and denominator.

Definition at line 2273 of file mp_rational.hpp.

Member Function Documentation

◆ operator()()

void piranha::boost_load_via_boost_api< Archive, mp_rational< SSize > >::operator() ( Archive &  ar,
mp_rational< SSize > &  x 
) const
inlineinherited

Call operator.

The body of this operator is equivalent to:

ar >> x;

That is, the content of ar will loaded into x using the stream extraction operator. In order for this method to be callable, the type T must provide valid overloads of the methods/functions needed by the Boost serialization API.

Parameters
arthe source archive.
xthe object into which the content of ar will be deserialized.
Exceptions
unspecifiedany exception thrown by the extraction of ar into x.

Definition at line 379 of file s11n.hpp.


The documentation for this struct was generated from the following file: