File tree Expand file tree Collapse file tree 6 files changed +57
-4
lines changed
include/beman/execution/detail Expand file tree Collapse file tree 6 files changed +57
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,23 @@ endif
107107# TODO: beman.execution.examples.modules
108108# FIXME: beman.execution.execution-module.test beman.execution.stop-token-module.test
109109
110- default : module
110+ default : simple
111+
112+ SIMPLE_BUILD = build/simple-$(shell uname -s)
113+
114+ .PHONY : simple simple-configure simple-build simple-test
115+
116+ simple : simple-test
117+
118+ simple-config :
119+ cmake -G Ninja -S . -B $(SIMPLE_BUILD ) -DBEMAN_USE_MODULES=OFF -DCXXFLAGS=
120+
121+ simple-build : simple-config
122+ CXXFLAGS= cmake --build $(SIMPLE_BUILD )
123+
124+ simple-test : simple-build
125+ ctest --test-dir $(SIMPLE_BUILD )
126+
111127
112128all : $(SANITIZERS )
113129
Original file line number Diff line number Diff line change 124124 # gersemi: on
125125 else ()
126126 message (
127- FATAL_ERROR
127+ STATUS
128128 "File does NOT EXISTS! ${CMAKE_CXX_STDLIB_MODULES_JSON} "
129129 )
130130 endif ()
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ if(PROJECT_IS_TOP_LEVEL)
1717 enable_testing()
1818endif()
1919
20- set(TODO stop_token) #-dk :TODO
20+ set(TODO stop_token) #-dk :TODO including that causes a linker error
2121set(EXAMPLES
2222 allocator
2323 doc-just
@@ -31,6 +31,7 @@ set(EXAMPLES
3131 sender-demo
3232 stackoverflow
3333 stopping
34+ suspend_never
3435 when_all-cancel
3536)
3637
Original file line number Diff line number Diff line change 1+ #include < beman/execution/execution.hpp>
2+ #include < iostream>
3+ #include < new>
4+ #include < memory>
5+
6+ namespace ex = beman::execution;
7+
8+ void * operator new (std::size_t n) {
9+ auto p = std::malloc (n);
10+ std::cout << " global new(" << n << " )->" << p << " \n " ;
11+ return p;
12+ }
13+ void operator delete (void * ptr) noexcept {
14+ std::cout << " global operator delete()" << ptr << " \n " ;
15+ }
16+
17+ int main () {
18+ struct resource : std::pmr::memory_resource {
19+ void * do_allocate (std::size_t n, std::size_t ) override { return std::malloc (n); }
20+ void do_deallocate (void * p, std::size_t n, std::size_t ) override { std::free (p); }
21+ bool do_is_equal (const std::pmr::memory_resource& other) const noexcept override {
22+ return this == &other;
23+ }
24+ } res{};
25+
26+ ex::sync_wait (
27+ ex::write_env (
28+ std::suspend_never (),
29+ ex::env{ex::prop{ex::get_allocator, std::pmr::polymorphic_allocator<std::byte>(&res)}}
30+ )
31+ );
32+ }
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ struct inline_scheduler {
5353 struct sender {
5454 using sender_concept = ::beman::execution::sender_t ;
5555 using completion_signatures = ::beman::execution::completion_signatures<::beman::execution::set_value_t ()>;
56+ template <typename ...>
57+ static consteval auto get_completion_signatures () noexcept -> completion_signatures {
58+ return {};
59+ }
5660
5761 static constexpr auto get_env () noexcept -> env { return {}; }
5862
Original file line number Diff line number Diff line change 1- // -dk:TODO rRW/// include/beman/execution/detail/store_receiver.hpp -*-C++-*-
1+ // include/beman/execution/detail/store_receiver.hpp -*-C++-*-
22// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33
44#ifndef INCLUDED_INCLUDE_BEMAN_EXECUTION_DETAIL_STORE_RECEIVER
You can’t perform that action at this time.
0 commit comments