alibaba / async_simple

Simple, light-weight and easy-to-use asynchronous components
Apache License 2.0
1.64k stars 246 forks source link

coro/Generator: correct Generator alias of std::generator #385

Closed tchaikov closed 1 month ago

tchaikov commented 1 month ago

before this change, the build fails, because AlloAllocator is not defined when the standard library provides std::generator, and the tree is built with C++23.

in this change, we replace AlloAllocator with Allocator. and the tree builds fine.

also, we include <generator> only if __cpp_lib_generator is defined. as the existence of the header does not imply that we are building with C++23.