Closed ecatmur closed 11 months ago
I get clang-tidy warnings whenever I initialize strands and executors for this same reason. The warnings also occur with asio::any_completion_executor
which I now use extensively.
Possibly fixed by 6c4a16680caa5e63e742f7041cf1fccaa30f1841, checking
Confirming fixed: https://godbolt.org/z/7c5PMchn3
Motivating example (incorrect, but an easy mistake to make):
Prior to https://github.com/chriskohlhoff/asio/commit/9d420678b4f89d20585f42f85deb0838e3597991 this would throw
asio::execution::bad_executor
; after that commit it just segfaults.Online example using Boost.Asio (1.80 vs 1.81): https://godbolt.org/z/WGvMEWr8P
We noticed this because clang-tidy started warning that
object_fns_
could be indirected while null.Presumably
query
/require
/prefer
need to check for nulltarget_
the same wayexecute
does?