// Copyright 2025 Matt Borland // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_DECIMAL_DETAIL_INT128_STRING_HPP #define BOOST_DECIMAL_DETAIL_INT128_STRING_HPP #include #include #ifndef BOOST_DECIMAL_DETAIL_INT128_BUILD_MODULE #include #endif namespace boost { namespace int128 { template auto to_string(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::string> { char buffer[64]; const auto last {detail::mini_to_chars(buffer, value, 10, false)}; return std::string{last, buffer + sizeof(buffer)}; } } // namespace int128 } // namespace boost #endif // BOOST_DECIMAL_DETAIL_INT128_STRING_HPP