|
uint256_t p = 115792089237316195423570985008687907853269984665640564039457584007908834671663;
|
Produces the first error, the rest of the errors are from the following:
1 2 3 4 5
|
inline const uint160 operator^(const base_uint160& a, const base_uint160& b) { return uint160(a) ^= b; }
inline const uint160 operator&(const base_uint160& a, const base_uint160& b) { return uint160(a) &= b; }
inline const uint160 operator|(const base_uint160& a, const base_uint160& b) { return uint160(a) |= b; }
inline const uint160 operator+(const base_uint160& a, const base_uint160& b) { return uint160(a) += b; }
inline const uint160 operator-(const base_uint160& a, const base_uint160& b) { return uint160(a) -= b; }
|
and
1 2 3 4 5
|
inline const uint256 operator^(const base_uint256& a, const base_uint256& b) { return uint256(a) ^= b; }
inline const uint256 operator&(const base_uint256& a, const base_uint256& b) { return uint256(a) &= b; }
inline const uint256 operator|(const base_uint256& a, const base_uint256& b) { return uint256(a) |= b; }
inline const uint256 operator+(const base_uint256& a, const base_uint256& b) { return uint256(a) += b; }
inline const uint256 operator-(const base_uint256& a, const base_uint256& b) { return uint256(a) -= b; }
|
Though I show only a few errors, there are 11 total. 10 of them reference each of the 10 lines of code with the "inline const" I have shown above and are virtually identical (IE: each one shows "^=" or "+=" or "-=" and so on.
Error 1 error C2177: constant too big c:\users\dalydir\documents\visual studio 2012\projects\consoleapplication3\consoleapplication3\consoleapplication3.cpp 25 1 ConsoleApplication3
2 IntelliSense: more than one operator "^=" matches these operands:
function template "T operator^=(const T &lhs, const uint256_t &rhs)"
function "base_uint<BITS>::operator^=(const base_uint<BITS> &b) [with BITS=160U]"
operand types are: uint160 ^= const base_uint160 c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\uint256.h 481 98 ConsoleApplication3
3 IntelliSense: more than one operator "&=" matches these operands:
function template "T operator&=(const T &lhs, const uint256_t &rhs)"
function "base_uint<BITS>::operator&=(const base_uint<BITS> &b) [with BITS=160U]"
operand types are: uint160 &= const base_uint160 c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\uint256.h 482 98 ConsoleApplication3
P in my original post was 2 to the 256th power. I think that I might be able to make sense of that "boost library" but I'm not counting on it being too soon.
The uint256_t is from:
https://github.com/calccrypto/uint256_t
Perhaps I'm getting my hopes up that there's an easy way to accomplish the whole 256 bit integer thing. If there was a built in 256 bit integer like just "int", I wouldn't even be asking this question.