Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/async_cobalt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ std::span<std::uint8_t const> bytes_of(std::string_view text) {
return {reinterpret_cast<std::uint8_t const*>(text.data()), text.size()};
}

// GCC 14 warns that each promise below, a coroutine, frees its frame with an operator delete that
// does not pair with the operator new that made it (-Wmismatched-new-delete); the pair is
// Boost.Cobalt's own, from its promise_memory_resource_base, and GCC 15 does not warn
// (boostorg/cobalt#7).
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 14
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmismatched-new-delete"
#endif

// The cheap functions, each awaited, against the synchronous function; and a refusal (an output of
// 0 bytes) through as_tuple, and with exceptions through a throw.
cobalt::promise<void> cheap() {
Expand Down Expand Up @@ -135,6 +144,10 @@ cobalt::promise<void> browser() {
}
#endif

#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 14
#pragma GCC diagnostic pop
#endif

// Runs the context until `done`, a promise started on it, is ready, and reads it.
void complete(webcpp::asio::io_context& context, cobalt::promise<void>& done) {
context.restart();
Expand Down
Loading