@@ -341,6 +341,11 @@ template <typename outstmtype>
341341inline constexpr void write_all_bytes_cold_impl (outstmtype outsm, ::std::byte const *first, ::std::byte const *last)
342342{
343343 using char_type = typename outstmtype::output_char_type;
344+ using char_type_const_ptr
345+ #if __has_cpp_attribute(__gnu__::__may_alias__)
346+ [[__gnu__::__may_alias__]]
347+ #endif
348+ = char_type const *;
344349 if constexpr (::fast_io::operations::decay::defines::has_write_all_bytes_overflow_define<outstmtype>)
345350 {
346351 write_all_bytes_overflow_define (outsm, first, last);
@@ -363,7 +368,8 @@ inline constexpr void write_all_bytes_cold_impl(outstmtype outsm, ::std::byte co
363368 ::std::ptrdiff_t itdiff{last - first};
364369 if (itdiff < bfddiff)
365370 {
366- obuffer_set_curr (outsm, non_overlapped_copy_n (first, static_cast <::std::size_t >(itdiff), curr));
371+ obuffer_set_curr (outsm, non_overlapped_copy_n (
372+ reinterpret_cast <char_type_const_ptr>(first), static_cast <::std::size_t >(itdiff), curr));
367373 return ;
368374 }
369375 }
@@ -421,11 +427,6 @@ inline constexpr void write_all_bytes_cold_impl(outstmtype outsm, ::std::byte co
421427 ::fast_io::operations::decay::defines::has_scatter_write_some_overflow_define<outstmtype> ||
422428 ::fast_io::operations::decay::defines::has_scatter_write_all_overflow_define<outstmtype>))
423429 {
424- using char_type_const_ptr
425- #if __has_cpp_attribute(__gnu__::__may_alias__)
426- [[__gnu__::__may_alias__]]
427- #endif
428- = char_type const *;
429430 char_type_const_ptr firstcptr{reinterpret_cast <char_type_const_ptr>(first)};
430431 char_type_const_ptr lastcptr{reinterpret_cast <char_type_const_ptr>(last)};
431432 ::fast_io::details::write_all_cold_impl (outsm, firstcptr, lastcptr);
@@ -448,11 +449,6 @@ inline constexpr void write_all_bytes_cold_impl(outstmtype outsm, ::std::byte co
448449 ::fast_io::operations::decay::defines::has_pwrite_some_overflow_define<outstmtype> ||
449450 ::fast_io::operations::decay::defines::has_scatter_pwrite_some_overflow_define<outstmtype>))
450451 {
451- using char_type_const_ptr
452- #if __has_cpp_attribute(__gnu__::__may_alias__)
453- [[__gnu__::__may_alias__]]
454- #endif
455- = char_type const *;
456452 char_type_const_ptr firstcptr{reinterpret_cast <char_type_const_ptr>(first)};
457453 char_type_const_ptr lastcptr{reinterpret_cast <char_type_const_ptr>(last)};
458454 ::fast_io::details::pwrite_all_cold_impl (outsm, firstcptr, lastcptr);
0 commit comments