gm3p/include/gm3p_int.hpp

28 lines
565 B
C++
Raw Normal View History

2020-07-18 21:06:17 +02:00
#pragma once
#include "gmp.h"
namespace gm3p
{
class gInt
{
public:
gInt();
gInt(mpz_t init);
gInt(long int init);
gInt(const char* init, int base);
~gInt();
gInt& operator=(const gInt& other);
friend gInt operator+(const gInt& left, const gInt& right);
friend gInt operator-(const gInt& left, const gInt& right);
friend gInt operator*(const gInt& left, const gInt& right);
friend gInt operator/(const gInt& left, const gInt& right);
friend std::ostream& operator<<(std::ostream& os, const gInt& value);
private:
mpz_t value;
};
}