I said that I am not sure if boost::variant supports __int128 because I had difficulties in compiling this code :
#include <boost/variant.hpp>
#include <string>
#include <iostream>
std::ostream& operator<<(std::ostream& o, const __int128& x) { if (x == std::numeric_limits<__int128>::min()) return o << "-170141183460469231731687303715884105728"; if (x < 0) return o << "-" << -x; if (x < 10) return o << (char)(x + '0'); return o << x / 10 << (char)(x % 10 + '0'); }
int main()
{
boost::variant<__int128, char, std::string> v;
v = 56;
v = 'Y';
__int128 d=12;
std::cout <<d << '\n';
std::cout << v << '\n';
v = "Yashaswi raj";
std::cout << v << '\n';
}
If u replace __int128 with int in the variant variable, it seems to work just fine...