Within the home_dir() function, the assertion CHECK_F has the incorrect logic for the return value of _dupenv_s on windows. It currently is asserting failure when errno_t is zero, which is not an error.
From documentation for _dupenv "Zero on success, an error code on failure"
I confirmed this in the debugger using MSVC2019 when a log file is provided of the form "~/mylogfile.log".
Within the home_dir() function, the assertion CHECK_F has the incorrect logic for the return value of _dupenv_s on windows. It currently is asserting failure when errno_t is zero, which is not an error.
From documentation for _dupenv "Zero on success, an error code on failure"
I confirmed this in the debugger using MSVC2019 when a log file is provided of the form "~/mylogfile.log".
Current
Needed fix