Skip to content

Commit 644a5f2

Browse files
committed
Export std::coro things in async_simple module
So that the users can use coroutines with async_simple without importing std.
1 parent 3a9f33b commit 644a5f2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ else()
3838
endif()
3939

4040
if (ASYNC_SIMPLE_ENABLE_TESTS)
41+
message(STATUS "going to find gtest")
4142
find_package(GTest)
4243
endif()
4344

async_simple/async_simple.cppm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,16 @@ export extern "C++" {
8484
#include "coro/Generator.h"
8585
#endif
8686
}
87+
88+
export namespace std {
89+
using std::coroutine_handle;
90+
using std::coroutine_traits;
91+
using std::operator==;
92+
using std::operator<=>;
93+
using std::hash;
94+
using std::noop_coroutine;
95+
using std::noop_coroutine_handle;
96+
using std::noop_coroutine_promise;
97+
using std::suspend_always;
98+
using std::suspend_never;
99+
} // namespace std

0 commit comments

Comments
 (0)