I think it wasn't mentioned yet:
There's a bug in mingw (gcc for Windows) which renders std::filesystem unusable right now. I'm currently writing some code that has to be platform-independent, and while C++17 is allowed, I still can't use std::filesystem (or even C++14 with std::experimental/filesystem), because mingw has a bug that prevents it from compiling as soon as you include <filesystem> and do anything with it (e.g. any example from any cpp reference).
So while it would be great to switch, here's just one more reason why it's gotta wait.
Change to stl::filesystem from Boost::filesystem
- DecumusScotti
- Posts: 49
- Joined: 08 Jul 2016, 17:26
- AnyOldName3
- Posts: 2678
- Joined: 26 Nov 2015, 03:25
Re: Change to stl::filesystem from Boost::filesystem
Any support in OpenMW for MSYS/MINGW/CGYWIN/WSL is accidental and breaking it isn't a blocker for anything. It's nice to have if we can keep it, but it's not something we go out of our way to target.
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Change to stl::filesystem from Boost::filesystem
According to:
https://sourceforge.net/p/mingw-w64/bugs/737/
https://stackoverflow.com/questions/523 ... windows-10
You should switch to using msys2, then you can use std::filesystem with mingw
https://sourceforge.net/p/mingw-w64/bugs/737/
https://stackoverflow.com/questions/523 ... windows-10
You should switch to using msys2, then you can use std::filesystem with mingw
Re: Change to stl::filesystem from Boost::filesystem
Has this been done yet?
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Change to std::filesystem from Boost::filesystem
So long as MacOS on Travis-CI hasn't been bumped to Catalina or higher, we're stuck.
Android SDK also does not support std::filesystem yet.
We can perhaps bump to C++17 and use some of the features, but we the main reason to move is for boost::filesystem...
Android SDK also does not support std::filesystem yet.
We can perhaps bump to C++17 and use some of the features, but we the main reason to move is for boost::filesystem...
- AnyOldName3
- Posts: 2678
- Joined: 26 Nov 2015, 03:25
Re: Change to stl::filesystem from Boost::filesystem
Have I mentioned how we're using boost::path::operator>> to get data files paths out of openmw.cfg? I doubt an equivalent std version would have the same escape system. We'd maybe have to look into what we'd do to maintain compatibility versus make things less bonkers.
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Change to stl::filesystem from Boost::filesystem
std::filesystem is more or less a 1:1 with boost::filesystem, including the same unicode quirks. I seem to remember that path was okay... but the fstream that was the problem because boost treats them as boost paths while standard library treats them as char *. So we might have to do some hand-holding there.