piranha  0.10
Public Member Functions | List of all members
piranha::msgpack_convert_impl< T, mp_integer_msgpack_convert_enabler< T > > Struct Template Reference

Specialisation of piranha::msgpack_convert() for piranha::mp_integer. More...

#include <piranha/mp_integer.hpp>

Public Member Functions

void operator() (T &n, const msgpack::object &o, msgpack_format f) const
 Call operator. More...
 

Detailed Description

template<typename T>
struct piranha::msgpack_convert_impl< T, mp_integer_msgpack_convert_enabler< T > >

Specialisation of piranha::msgpack_convert() for piranha::mp_integer.

Note
This specialisation is enabled if:
  • T is an instance of piranha::mp_integer,
  • the integral types used in the internal representation of the integer, bool and std::string satisfy piranha::has_msgpack_convert,
  • the size type of std::vector<msgpack::object> can be safely converted to the integral type representing the size of the integer.

Definition at line 901 of file mp_integer.hpp.

Member Function Documentation

◆ operator()()

template<typename T >
void piranha::msgpack_convert_impl< T, mp_integer_msgpack_convert_enabler< T > >::operator() ( T &  n,
const msgpack::object &  o,
msgpack_format  f 
) const
inline

Call operator.

This method will convert the object o into n. If f is piranha::msgpack_format::binary, this method offers the basic exception safety guarantee and it performs minimal checking on the input data. Calling this method in binary mode will result in undefined behaviour if o does not contain an integer serialized via msgpack_pack().

Parameters
nthe destination piranha::mp_integer.
osource object.
fthe desired piranha::msgpack_format.
Exceptions
std::invalid_argumentif, in binary mode, the serialized static integer has a number of limbs greater than its static size.
std::overflow_errorif the number of limbs is larger than an implementation-defined value.
unspecifiedany exception thrown by:

Definition at line 922 of file mp_integer.hpp.


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