c++17 `filesystem` is not a namespace-name
GCC 5.4.0 was released in June of 2016; over a year before the C++17 standard was adopted. It and its version of libstdc++ have very limited C++17 support. You can see when GCC added C++17 language features here and when libstdc++ added C++17 standard library features here.
At the time of GCC 5.4's release, the filesystem library was not yet implemented in the std::filesystem
namespace. It, along with any other <experimental/...> headers that are included in that version, are in the std::experimental
namespace.
<experimental/..>
means experimental namespace:
namespace fs = std::experimental::filesystem;
See: http://en.cppreference.com/w/cpp/experimental/fs/path