AMInteger  201909
String localization library
Andromeda AMInteger library

AMInteger - Safe integer operations with overflow detection.If overflow of two integral types may cause problem, you need to use this two funtions. Expore file AMInteger.h.

Template functions - support all integral types.

Usage

bool rs;
int rv;
rs = AMIntegerMultiply( 10 , 20 , rv);
rs = AMIntegerAdd( 10 , 20 , rv);

Sources

Download at GitHUB

Building AMInteger

Getting sources

git submodule update

Compiling

mkdir cmake-build-debug
cd cmake-build-debug
cmake ..
make

Single test (not necessary)

./TEST_AMInteger

Licencing

This library is under GNU GPL v3 license. If you need business license, don't hesitate to contact me.

Contribute

Please contact me.

Dependencies

AMCore::AMIntegerMultiply
bool AMIntegerMultiply(TIntType a, TIntType b, TIntType &result)
Safe multiply with overflow detection.
Definition: AMInteger.h:59
AMInteger.h
AMCore::AMIntegerAdd
bool AMIntegerAdd(TIntType a, TIntType b, TIntType &result)
Safe addition with overflow detection.
Definition: AMInteger.h:158