Hi, just a quick issue (I would have opened it on GitHub, but apparently only contributors can)."
Trying to print a uint128_t value causes the following compilation error:
error: use of overloaded operator '<<' is ambiguous (with operand types 'ostream' (aka 'basic_ostream<char>') and 'uint128_t' (aka 'unsigned __int128'))
32 | std::cout << x;
I guess the definition for << is missing, or something like that. The bug is easily replicable, simply write
uint128_t/__uint128_t is not a standard C++ type, it’s a compiler extension. that’s why std::cout does not natively support it.
you can print it with a custom function similar to this:
std::string to_string_uint128(__uint128_t v) {
if (v == 0)
return "0";
std::string s;
while (v > 0) {
s.push_back((v % 10) + 48);
v /= 10;
}
std::reverse(s.begin(), s.end());
return s;
}