On Sun, 20 Oct 2024 at 20:32, Vinnie Falco
libraries, effectively creating separate object files which have the potential to be incompatible at link-time. It is simpler for there to be only one version of the library with no configurations.
Yes, it is bad and won't work for a library that has to be compiled (and I hope this will be one of the conditions imposed if this lib gets accepted). But IMO even that is better than letting users with no clue about what is happening. To the bare minimum I would log, resolving, connecting, handshaking, reading and writing, for example log("resolving"); obj.async_resolve(...) if (ec) { log("resolve failt with:" , ec); return; }
our goal is to find a more elegant, C++-style solution that achieves the same effect.
<snip>
This is the approach I took in Boost.Redis: https://www.boost.org/doc/libs/1_86_0/libs/redis/doc/html/classboost_1_1redi... The template parameter is an annoyance to deal with in type-erased connection types where a definite type is required. It is also questionable to pollute the public API with log types just because we are too afraid of upsetting users by logging into a global state. We have a log library in Boost so why not default to it? Marcelo