piranha  0.10
Functions
piranha::literals Namespace Reference

Inline namespace for the definition of user-defined literals. More...

Functions

integer operator"" _z (const char *s)
 Literal for arbitrary-precision integers. More...
 
rational operator"" _q (const char *s)
 Literal for arbitrary-precision rationals. More...
 
real operator"" _r (const char *s)
 Literal for piranha::real. More...
 

Detailed Description

Inline namespace for the definition of user-defined literals.

Function Documentation

◆ operator"" _q()

rational piranha::literals::operator"" _q ( const char *  s)
inline

Literal for arbitrary-precision rationals.

Parameters
sliteral string.
Returns
a piranha::mp_rational constructed from s.
Exceptions
unspecifiedany exception thrown by the constructor of piranha::mp_rational from string.

Definition at line 1786 of file mp_rational.hpp.

◆ operator"" _r()

real piranha::literals::operator"" _r ( const char *  s)
inline

Literal for piranha::real.

The return value will be constructed with default precision.

Parameters
sliteral string.
Returns
a piranha::real constructed from s.
Exceptions
unspecifiedany exception thrown by the constructor of piranha::real from string.

Definition at line 2349 of file real.hpp.

◆ operator"" _z()

integer piranha::literals::operator"" _z ( const char *  s)
inline

Literal for arbitrary-precision integers.

Parameters
sliteral string.
Returns
a piranha::integer constructed from s.
Exceptions
unspecifiedany exception thrown by the constructor of piranha::integer from string.

Definition at line 593 of file mp_integer.hpp.