#pragma once #include // std::setfill, std::setw #include // std::stringstream namespace Inferno { template std::string intToHex(T i) { std::stringstream stream; stream << "0x" << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << i; return stream.str(); } } // namespace Inferno