Skip to content

Commit 3cfbdd5

Browse files
authored
Merge pull request #1268 from trcrsired/next
Next
2 parents 01ebc56 + 73f1bfa commit 3cfbdd5

6 files changed

Lines changed: 36 additions & 19 deletions

File tree

benchmark/0016.endl/u8c_file_unlocked.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace fast_io::io;
77
int main()
88
{
99
fast_io::timer tm(u8"u8c_file_unlocked");
10-
fast_io::u8c_file_unlocked cf(u8"filebuf_file.txt", fast_io::open_mode::out);
10+
fast_io::u8c_file_unlocked cf(u8"c_file_unlocked.txt", fast_io::open_mode::out);
1111
for (std::size_t i{}; i != 10000000; ++i)
1212
{
1313
print(cf, u8"Hello World\n");

examples/0009.filesystem/gccx86canadianfix.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
5050
$install_prog $dir/$dlname $destdir/$dlname~
5151
chmod a+x $destdir/$dlname~
5252
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
53-
eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
53+
eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
5454
fi'
5555
else
5656
postinstall_cmds='base_file=`basename \${file}`~
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
6060
$install_prog $dir/$dlname \$dldir/$dlname~
6161
chmod a+x \$dldir/$dlname~
6262
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
63-
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
63+
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6464
fi'
6565
fi
6666
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~

include/fast_io_core_impl/freestanding/algorithm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ constexpr auto lexicographical_compare_three_way(I1 f1, I1 l1, I2 f2, I2 l2)
4949
#endif
5050
#endif
5151

52-
#if 0
53-
//__STDC_HOSTED__==1 && (!defined(_GLIBCXX_HOSTED) || _GLIBCXX_HOSTED==1)
52+
#if 1
53+
5454
namespace fast_io::freestanding
5555
{
5656
using ::std::find_if;

include/fast_io_core_impl/operations/writeimpl/basis.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ template <typename outstmtype>
341341
inline 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);

include/fast_io_restricted.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#pragma once
2+
/*
3+
fast_io_restricted is experimental to support app sandboxing cross platformly
4+
5+
It is based on
6+
PWAs: web file system access
7+
*/

share/fast_io/fast_io_inc/core.inc

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ using ::fast_io::char_literal_v;
55
using ::fast_io::pr_rsv_size;
66
using ::fast_io::pr_rsv_to_iterator_unchecked;
77

8+
using ::fast_io::io_alias_t;
9+
using ::fast_io::io_alias;
810
using ::fast_io::io_alias_type_t;
11+
using ::fast_io::io_alias_type;
912

1013
using ::fast_io::io_reserve_type_t;
1114
using ::fast_io::io_reserve_type;
@@ -124,7 +127,7 @@ using ::fast_io::io_stream_buffer_flush_define;
124127

125128
namespace manipulators
126129
{
127-
130+
128131
using ::fast_io::manipulators::print_alias_define;
129132
using ::fast_io::manipulators::print_reserve_size;
130133
using ::fast_io::manipulators::print_reserve_define;
@@ -217,8 +220,19 @@ using ::fast_io::manipulators::strvw;
217220

218221
namespace char_category
219222
{
220-
using ::fast_io::char_category::is_dos_file_invalid_character;
221-
}
223+
using ::fast_io::char_category::is_dos_file_invalid_character;
224+
using ::fast_io::char_category::char_category_family;
225+
using ::fast_io::char_category::char_category_traits;
226+
using ::fast_io::char_category::to_c_lower;
227+
using ::fast_io::char_category::to_c_upper;
228+
using ::fast_io::char_category::to_c_halfwidth;
229+
namespace ranges
230+
{
231+
using ::fast_io::char_category::ranges::to_c_lower;
232+
using ::fast_io::char_category::ranges::to_c_upper;
233+
using ::fast_io::char_category::ranges::to_c_halfwidth;
234+
} // namespace ranges
235+
} // namespace char_category
222236

223237
namespace mnp = manipulators;
224238

0 commit comments

Comments
 (0)