diff --git a/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc b/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc index 8491a8690..8b2f91f1a 100644 --- a/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc +++ b/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc @@ -1,6 +1,7 @@ #include #include #include +#include int main() { diff --git a/examples/0040.thread/thread.cc b/examples/0040.thread/thread.cc deleted file mode 100644 index 466669027..000000000 --- a/examples/0040.thread/thread.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -int main() -{ - auto t = ::fast_io::native_thread{[](int param) -#if __cpp_static_call_operator >= 2020207L - static -#endif - noexcept { - ::fast_io::println("the param is: ", param); -#ifdef _WIN32 -#ifdef _WIN32_WINDOWS - ::fast_io::println("the child thread id is: ", ::fast_io::this_thread::get_id()); -#else - ::fast_io::println("the child thread id is: ", ::fast_io::mnp::pointervw(::fast_io::this_thread::get_id())); -#endif -#else - ::fast_io::println("the child thread id is: ", ::fast_io::this_thread::get_id()); -#endif - // ::fflush(stdout); - ::fast_io::this_thread::sleep_for(::std::chrono::seconds{1}); - }, - 5}; - - t.join(); -#ifdef _WIN32 -#ifdef _WIN32_WINDOWS - ::fast_io::println("the parent thread id is: ", ::fast_io::this_thread::get_id()); -#else - ::fast_io::println("the parent thread id is: ", ::fast_io::mnp::pointervw(::fast_io::this_thread::get_id())); -#endif -#else - ::fast_io::println("the parent thread id is: ", ::fast_io::this_thread::get_id()); -#endif - - -} diff --git a/include/fast_io_hosted/threads/thread/impl.h b/include/fast_io_hosted/threads/thread/impl.h index d55c3c541..90c452b83 100644 --- a/include/fast_io_hosted/threads/thread/impl.h +++ b/include/fast_io_hosted/threads/thread/impl.h @@ -1,5 +1,5 @@ #pragma once - +#if 0 #if (defined(_WIN32) && !defined(__WINE__)) && !defined(__CYGWIN__) #include "win32.h" #ifndef _WIN32_WINDOWS @@ -12,3 +12,4 @@ #elif !defined(__SINGLE_THREAD__) && !defined(__NEWLIB__) && !defined(__MSDOS__) && __has_include() #include "pthread.h" #endif +#endif diff --git a/tests/0026.container/0013.str_btree_set/str_btree_set.cc b/tests/0026.container/0013.str_btree_set/str_btree_set.cc index 22da8d211..a53167e00 100644 --- a/tests/0026.container/0013.str_btree_set/str_btree_set.cc +++ b/tests/0026.container/0013.str_btree_set/str_btree_set.cc @@ -1,4 +1,4 @@ - +#include #include #include @@ -41,13 +41,13 @@ int main() } ::fast_io::io::print("\nreverse:\n"); -/* -// ::std::ranges::reverse_view does not pass CI - for (auto const &e : ::std::ranges::reverse_view(bset)) -*/ - for(auto i{bset.crbegin()},ed{bset.crend()};i!=ed;++i) + /* + // ::std::ranges::reverse_view does not pass CI + for (auto const &e : ::std::ranges::reverse_view(bset)) + */ + for (auto i{bset.crbegin()}, ed{bset.crend()}; i != ed; ++i) { - auto const& e{*i}; + auto const &e{*i}; ::fast_io::io::println(e); } @@ -76,10 +76,10 @@ int main() ::fast_io::io::println("found: ", *it); } } - for (::std::size_t i{};i!=::std::size(fruits);++i) - { - auto const& e{fruits[i]}; - bset.erase_key(e); + for (::std::size_t i{}; i != ::std::ranges::size(fruits); ++i) + { + auto const &e{fruits[i]}; + bset.erase_key(e); } ::fast_io::io::println("bset.is_empty():", bset.is_empty());