File tree Expand file tree Collapse file tree 2 files changed +9
-19
lines changed
Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change 123123 )
124124 # gersemi: on
125125 else ()
126- message (
127- STATUS
128- "File does NOT EXISTS! ${CMAKE_CXX_STDLIB_MODULES_JSON} "
129- )
126+ message (STATUS "File does NOT EXISTS! ${CMAKE_CXX_STDLIB_MODULES_JSON} " )
130127 endif ()
131128endif ()
Original file line number Diff line number Diff line change 11#ifdef BEMAN_HAS_IMPORT_STD
22import std;
33#else
4+ #include < coroutine>
45#include < iostream>
56#include < new>
67#include < memory>
@@ -14,23 +15,15 @@ void* operator new(std::size_t n) {
1415 std::cout << " global new(" << n << " )->" << p << " \n " ;
1516 return p;
1617}
17- void operator delete (void * ptr) noexcept {
18- std::cout << " global operator delete()" << ptr << " \n " ;
19- }
18+ void operator delete (void * ptr) noexcept { std::cout << " global operator delete()" << ptr << " \n " ; }
2019
2120int main () {
22- struct resource : std::pmr::memory_resource {
23- void * do_allocate (std::size_t n, std::size_t ) override { return std::malloc (n); }
24- void do_deallocate (void * p, std::size_t n, std::size_t ) override { std::free (p); }
25- bool do_is_equal (const std::pmr::memory_resource& other) const noexcept override {
26- return this == &other;
27- }
21+ struct resource : std::pmr::memory_resource {
22+ void * do_allocate (std::size_t n, std::size_t ) override { return std::malloc (n); }
23+ void do_deallocate (void * p, std::size_t n, std::size_t ) override { std::free (p); }
24+ bool do_is_equal (const std::pmr::memory_resource& other) const noexcept override { return this == &other; }
2825 } res{};
2926
30- ex::sync_wait (
31- ex::write_env (
32- std::suspend_never (),
33- ex::env{ex::prop{ex::get_allocator, std::pmr::polymorphic_allocator<std::byte>(&res)}}
34- )
35- );
27+ ex::sync_wait (ex::write_env (
28+ std::suspend_never (), ex::env{ex::prop{ex::get_allocator, std::pmr::polymorphic_allocator<std::byte>(&res)}}));
3629}
You can’t perform that action at this time.
0 commit comments