Skip to content

Commit 72a0402

Browse files
committed
fix
1 parent 00760eb commit 72a0402

File tree

15 files changed

+111
-12
lines changed

15 files changed

+111
-12
lines changed

include/fast_io_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <bit>
1313
#include <limits>
1414
#include <cstdint>
15+
#include <version>
1516

1617
#if __cpp_lib_three_way_comparison >= 201907L
1718
#include <compare>

include/fast_io_core_impl/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ inline constexpr T compile_pow2{::fast_io::details::compile_pow_n<T, 2, pow>};
467467

468468

469469
inline constexpr bool is_wasi_environment{
470-
#if __wasi__
470+
#ifdef __wasi__
471471
true
472472
#endif
473473
};

include/fast_io_freestanding_impl/serializations/lebe.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ inline constexpr auto iec559_lebe_put(T t)
181181
}
182182
else
183183
{
184-
#if __STDCPP_FLOAT32_T__
184+
#ifdef __STDCPP_FLOAT32_T__
185185
return ::fast_io::manipulators::lebe_put<en, 32>(
186186
::std::bit_cast<::std::uint_least32_t>(static_cast<_Float32>(t)));
187187
#else
@@ -198,7 +198,7 @@ inline constexpr auto iec559_lebe_put(T t)
198198
}
199199
else
200200
{
201-
#if __STDCPP_FLOAT64_T__
201+
#ifdef __STDCPP_FLOAT64_T__
202202
return ::fast_io::manipulators::lebe_put<en, 64>(
203203
::std::bit_cast<::std::uint_least64_t>(static_cast<_Float64>(t)));
204204
#else
@@ -208,7 +208,7 @@ inline constexpr auto iec559_lebe_put(T t)
208208
}
209209
else if constexpr (::std::same_as<nocvref, long double>)
210210
{
211-
#if __STDCPP_FLOAT128_T__
211+
#ifdef __STDCPP_FLOAT128_T__
212212
using proxy_type = ::fast_io::details::pesudo_int128type;
213213
return ::fast_io::manipulators::basic_lebe_get_put<en, basic_lebe_put_integral<128, proxy_type>>{
214214
{::std::bit_cast<::fast_io::details::pesudo_int128type>(static_cast<_Float128>(t))}};
@@ -480,7 +480,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef
480480
}
481481
else
482482
{
483-
#if __STDCPP_FLOAT32_T__
483+
#ifdef __STDCPP_FLOAT32_T__
484484
t = static_cast<flttypef>(::std::bit_cast<_Float32>(temp));
485485
#else
486486
static_assert(isiec559, "float is not iec60559");
@@ -495,7 +495,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef
495495
}
496496
else
497497
{
498-
#if __STDCPP_FLOAT64_T__
498+
#ifdef __STDCPP_FLOAT64_T__
499499
t = static_cast<flttypef>(::std::bit_cast<_Float64>(temp));
500500
#else
501501
static_assert(isiec559, "double is not iec60559");
@@ -504,7 +504,7 @@ scan_precise_reserve_define_lebe_float_get_impl(char_type const *iter, flttypef
504504
}
505505
else if constexpr (::std::same_as<flttype, long double>)
506506
{
507-
#if __STDCPP_FLOAT128_T__
507+
#ifdef __STDCPP_FLOAT128_T__
508508
t = static_cast<flttypef>(::std::bit_cast<_Float128>(temp));
509509
#else
510510
static_assert(sizeof(double) != sizeof(long) && isiec559,

include/fast_io_hosted/timeutil/time.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ namespace fast_io
66
namespace posix
77
{
88
#if !defined(_WIN32) && !defined(__AVR__) && !defined(__MSDOS__)
9-
#ifdef __DARWIN_C_LEVEL
9+
#if defined(__DARWIN_C_LEVEL)
1010
extern int libc_clock_getres(clockid_t clk_id, struct timespec *tp) noexcept __asm__("_clock_getres");
1111
extern int libc_clock_settime(clockid_t clk_id, struct timespec const *tp) noexcept __asm__("_clock_settime");
1212
extern int libc_clock_gettime(clockid_t clk_id, struct timespec *tp) noexcept __asm__("_clock_gettime");
1313
#else
14-
#if _REDIR_TIME64
14+
#if defined(_REDIR_TIME64)
1515
extern int libc_clock_getres(clockid_t clk_id, struct timespec *tp) noexcept __asm__("__clock_getres64");
1616
extern int libc_clock_settime(clockid_t clk_id, struct timespec const *tp) noexcept __asm__("__clock_settime64");
1717
extern int libc_clock_gettime(clockid_t clk_id, struct timespec *tp) noexcept __asm__("__clock_gettime64");

share/fast_io/fast_io.cppm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export module fast_io;
2020
#include "fast_io_inc/core.inc"
2121
#include "fast_io_inc/core/allocation.inc"
2222
#include "fast_io_inc/freestanding.inc"
23+
#include "fast_io_inc/intrinsics.inc"
2324

2425
#ifndef FAST_IO_FREESTANDING
2526
# include "fast_io_inc/hosted.inc"

share/fast_io/fast_io_inc/core.inc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ 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_type_t;
9+
810
using ::fast_io::io_reserve_type_t;
911
using ::fast_io::io_reserve_type;
1012
using ::fast_io::print_alias_define;
@@ -22,13 +24,31 @@ using ::fast_io::scan_context_eof_define;
2224
using ::fast_io::unreachable;
2325
using ::fast_io::noexcept_call;
2426

27+
using ::fast_io::little_endian;
28+
using ::fast_io::big_endian;
29+
using ::fast_io::byte_swap;
30+
2531
using ::fast_io::error;
32+
using ::fast_io::error_type_t;
33+
using ::fast_io::error_type;
34+
using ::fast_io::error_domain;
35+
using ::fast_io::is_domain;
36+
using ::fast_io::to_code;
37+
using ::fast_io::throw_parse_code;
38+
using ::fast_io::parse_domain_value;
39+
2640
using ::fast_io::cstr_len;
2741
using ::fast_io::cstr_nlen;
2842

2943
using ::fast_io::parse_by_scan;
3044
using ::fast_io::parse_code;
3145

46+
using ::fast_io::io_dup;
47+
using ::fast_io::open_mode;
48+
49+
using ::fast_io::basic_io_lockable;
50+
using ::fast_io::basic_io_lockable_nonmovable;
51+
3252
#if !defined(__clang__) // The gcc and msvc module does not support non-exported functions adl matching
3353
using ::fast_io::input_stream_ref_define;
3454
using ::fast_io::output_stream_ref_define;
@@ -131,6 +151,9 @@ using ::fast_io::manipulators::scalar_manip_t;
131151
using ::fast_io::manipulators::member_function_pointer_holder_t;
132152
using ::fast_io::manipulators::whole_get_t;
133153

154+
using ::fast_io::manipulators::leb128_get;
155+
using ::fast_io::manipulators::leb128_put;
156+
134157
using ::fast_io::manipulators::boolalpha;
135158

136159
using ::fast_io::manipulators::pointervw;
@@ -144,6 +167,8 @@ using ::fast_io::manipulators::os_c_str_carr;
144167

145168
using ::fast_io::manipulators::rgvw;
146169

170+
using ::fast_io::manipulators::cond;
171+
147172
using ::fast_io::manipulators::code_cvt;
148173
using ::fast_io::manipulators::code_cvt_os_c_str;
149174
using ::fast_io::manipulators::os_c_str_null_terminated;
@@ -225,10 +250,18 @@ using ::fast_io::operations::scatter_pread_all_bytes;
225250
using ::fast_io::operations::scatter_pread_some;
226251
using ::fast_io::operations::scatter_pread_some_bytes;
227252

253+
using ::fast_io::operations::output_stream_ref;
254+
228255
namespace decay
229256
{
230257
using ::fast_io::operations::decay::scan_freestanding_decay;
231258
using ::fast_io::operations::decay::print_freestanding_decay;
259+
260+
using ::fast_io::operations::decay::stream_ref_decay_lock_guard;
261+
using ::fast_io::operations::decay::unlock_stream_ref_decay_lock_guard;
262+
using ::fast_io::operations::decay::output_stream_mutex_ref_decay;
263+
using ::fast_io::operations::decay::output_stream_unlocked_ref_decay;
264+
232265
} // namespace decay
233266

234267
using ::fast_io::operations::print_freestanding;

share/fast_io/fast_io_inc/detail.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ export namespace fast_io
22
{
33
namespace details
44
{
5-
5+
using ::fast_io::details::is_ebcdic;
66
} // namespace details
77
}

share/fast_io/fast_io_inc/device.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ using ::fast_io::u32ibuf_file_lockable;
5151
using ::fast_io::u32obuf_file_lockable;
5252
using ::fast_io::u32iobuf_file_lockable;
5353

54+
using ::fast_io::io_strlike_reference_wrapper;
55+
5456
#if defined(_WIN32) || (__has_include(<sys/socket.h>) && __has_include(<netinet/in.h>) && !defined(__wasi__))
5557

5658
using ::fast_io::basic_iobuf_socket_file;

share/fast_io/fast_io_inc/dsal/string_view.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ using ::fast_io::u8cstring_view;
2525
using ::fast_io::u16cstring_view;
2626
using ::fast_io::u32cstring_view;
2727

28+
using ::fast_io::basic_string_view;
29+
2830
} // namespace fast_io

share/fast_io/fast_io_inc/freestanding.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ export namespace fast_io
33
namespace freestanding
44
{
55

6+
using ::fast_io::freestanding::is_zero_default_constructible_v;
7+
using ::fast_io::freestanding::is_trivially_copyable_or_relocatable_v;
8+
69
using ::fast_io::freestanding::is_trivially_copyable_or_relocatable;
710
using ::fast_io::freestanding::is_zero_default_constructible;
811

@@ -44,5 +47,6 @@ using ::fast_io::freestanding::find_first_not_of;
4447
using ::fast_io::freestanding::find_last_of;
4548
using ::fast_io::freestanding::find_last_not_of;
4649

50+
using ::fast_io::freestanding::errc;
4751
} // namespace freestanding
4852
} // namespace fast_io

0 commit comments

Comments
 (0)