When I type __int128 in a C++ project in Visual Studio, the editor changes color of __int128 to blue (like keyword).
But when I compile the
Your conversions to/from string could use some improvement.
For saftey, the interface for converting to a string should include the allocated length of the user provided string, so you can return an error if they didn't provide enough memory.
Also, try to process strings in chunks: for example, suppose the user wants to convert a 128 bit number into base 10. Instead of repeatedly doing modulo 10, you could be doing modulo 1000000000ul, and using sprintf(s, "%09u", c).
Converting from a string could be similarly optimized.
It would not be a bad idea to include a divrem method, with a return type of std::pair<_uint128, _uint128>.
It would be absolutely awesome if you had a integer class where the type used for hi and lo was a template parameter. Then, with a small handful of typedefs, you could create an int256, an int512, etc..