I need to obtain the current user's home directory and then append to it paths to other directories. Since the app is cross-platform then the approach should take this into consideration. I have been looking for a solution without success. Is there a way to get current user's home directory using C++17 std::filesystem?
No.
The only special directories you are handed is a directory suitable for temporary files, and the current directory.
You'll have to write a OS specific wrapper for getting the home directory. I, personally, think that is a bad idea: rather, you should have "user app settings" directory function, "user document'" directory function, etc (as determined by your application needs). Where those directories are compared to the home directory vary on a OS by OS basis.
In my experience, also having an API for storing a "registry-like property set" is a good idea (a string-string map with serialization code on the values, for example). It can map to plists on macOS, registry on windows, and something else on linux.