Skip to content

Commit 0baa172

Browse files
committed
Make 128-bit unsigned_integer a template type like the other impl
1 parent 993c2fc commit 0baa172

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

include/boost/charconv/detail/to_chars_integer_impl.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,13 @@ BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars_integer_impl(char* first, char
214214
// to extract the digits
215215
//
216216
// See: https://quuxplusone.github.io/blog/2019/02/28/is-int128-integral/
217-
template <typename Integer>
217+
#ifdef BOOST_CHARCONV_HAS_INT128
218+
template <typename Integer, typename Unsigned_Integer = boost::uint128_type>
219+
#else
220+
template <typename Integer, typename Unsigned_Integer = uint128>
221+
#endif
218222
BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars_128integer_impl(char* first, char* last, Integer value) noexcept
219223
{
220-
#ifdef BOOST_CHARCONV_HAS_INT128
221-
using Unsigned_Integer = boost::uint128_type;
222-
#else
223-
using Unsigned_Integer = uint128;
224-
#endif
225-
226224
Unsigned_Integer unsigned_value {};
227225

228226
const std::ptrdiff_t user_buffer_size = last - first;

0 commit comments

Comments
 (0)