xieite::int128_t, xieite::uint128_t

Defined in header <xieite/math/int128_t.hpp>

Type aliases for compiler-dependent 128-bit integer types. Primarily supports GCC and Clang. MSVC's internal 128-bit integer types are included for consistency, but are actually classes.


Declarations

#signed
using int128_t = /* __int128 */;

#unsigned
using uint128_t = /* unsigned __int128 */;


Example

int main() {
	xieite::uint128_t x = -1ull;
	x += 1;
	
	std::string str;
	do {
		str += static_cast<char>(x % 10 + '0');
		x /= 10;
	} while (x);

	xieite::dump(str | std::views::reverse);
}
Possible output:
18446744073709551616
[View in Compiler Explorer]