arby  v0.4.2
Arbitrary precision arithmetic in C++, even at compile time
Functions
com::saxbophone::arby::literals Namespace Reference

Various custom user-defined-literals for creating arby objects. More...

Functions

constexpr Nat operator""_nat (const char *literal)
 raw user-defined-literal for Nat class More...
 

Detailed Description

Various custom user-defined-literals for creating arby objects.

Note
You need to introduce this namespace into global scope with using namespace com::saxbophone::arby::literals in order to be able to use these literals in your code e.g. arby::Nat f = 12345_nat This can be done without bringing the whole of arby into global scope and these literals are provided in a sub-namespace for this exact reason
If you introduce namespace com::saxbophone::arby into global scope, you don't need to also introduce this literals namespace –arby introduces this one automatically.

Function Documentation

◆ operator""_nat()

constexpr Nat com::saxbophone::arby::literals::operator""_nat ( const char *  literal)
constexpr

raw user-defined-literal for Nat class

Parameters
literalthe literal
Returns
Corresponding arby::Nat value
Note
we use a raw literal in this case because as the Nat type is unbounded, we want to support a potentially infinite number of digits, or certainly more than can be stored in unsigned long long...