<string> Support
#include <boost/int128/string.hpp>
The following are functions analogous to those found in <string> for builtin integer types.
#include <boost/int128/string.hpp>
namespace boost {
namespace int128 {
// Constrained to T being int128_t or uint128_t.
template <typename T>
std::enable_if_t<std::is_same<T, int128_t>::value || std::is_same<T, uint128_t>::value, std::string>
to_string(const T& value);
} // namespace int128
} // namespace boost
Returns a std::string containing the decimal(base-10) representation of value.
These functions may throw std::bad_alloc from the constructor of std::string.
An example of how to use these functions is available on the examples page.