27 lines
469 B
C++
27 lines
469 B
C++
#ifndef BIG_INT_HPP
|
|
#define BIG_INT_HPP
|
|
|
|
#include <string>
|
|
#include "tl/expected.hpp"
|
|
|
|
struct BigInt {
|
|
BigInt() : data() {}
|
|
virtual ~BigInt() {}
|
|
enum class eError {
|
|
PARSE_ERROR
|
|
};
|
|
|
|
|
|
std::string data;
|
|
|
|
static tl::expected<BigInt,eError> from_string(const std::string& str);
|
|
static BigInt from_int(uint64_t value);
|
|
std::string to_string() const;
|
|
};
|
|
|
|
bool operator == (const BigInt& rhs, const BigInt& lhs);
|
|
|
|
#endif // #ifndef #ifndef BIG_INT_HPP
|
|
|
|
|