interestingly, this example does compile successfully against boost-1.80.0 where the feature was introduced:
Changed spawn() to be a completion token-based asynchronous operation. This introduces new spawn() overloads that conform to the requirements for asynchronous operations.
but fails with any boost version after 1.80.0
the equivalent example with co_spawn() compiles and runs successfully:
minimal reproducer fails to compile against the
boost-1.86.0
tag with bothgcc (GCC) 14.2.1
andclang version 18.1.8
(both logs in https://gist.github.com/cbodley/1b3a85b6281133fc8ea96dfc1b9c2f5b)see godbolt example in https://godbolt.org/z/bMjj11h7o
interestingly, this example does compile successfully against boost-1.80.0 where the feature was introduced:
but fails with any boost version after 1.80.0
the equivalent example with
co_spawn()
compiles and runs successfully: