I just tried with g++ (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) on Fedora and it works well. But to be able to link, I had to add -lstdc++fs.
I just tried with g++ (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) on Fedora and it works well. But to be able to link, I had to add -lstdc++fs.