So I decided to get rid of singletons in my project and introduce dependency injection. I did all the necessary changes, and I got a little problem: no matter what I did, my NetworkService was called anyway, regardless of the fact it was initialised to nullptr. I started to investigate, and I got an impossible scenario. I'm feeling powerless, and I give up. I don't know how THIS code gets executed without issues:
auto impossible_response = ((NetworkService*)nullptr)->post(
format_url("/api/data/fetch/"),
payload.dump(),
headers);
log.crit("How did this succeeded? Please help me, StackOverflow");
I'm compiling my code on ArcoLinux with G++ (C++20) via Gradle. I've already tryied to rebuild it from scratch without any cache from previous builds.