3

I'm trying to port a project from VS2015 that used std::experimental::filesystem to use Intel C++ Compiler 19.1.

The compiler gets upset when attempting to deal with this:

#include <filesystem>
std::experimental::filesystem::path foo;

saying that it can't resolve the namespace experimental. Ok, that is supposedly removed, so we'll try with just std::filesystem, as follows:

#include <filesystem>
std::filesystem::path foo;

Error: can not resolve namespace filesystem. Let's try stepping backwards:

#include <experimental/filesystem>
std::experimental::filesystem::path foo;

Now it "works" but complains that the <experimental/filesystem> header is deprecated by Microsoft and will be removed, superseded by the C++17 header providing std::filesystem, and that I have to provide a #define acknowledging this to allow it to continue.

Here is the main part of the question:

Does anyone have any certainty on the state of Intel's C++ Compiler support for std::filesystem?

A question here which asks about GCC, solutions seem to work there but similar will fail under Intel C++, or use workarounds I'm trying to avoid (see Edit subsection below).

This question was asked back in 2016 and before the C++17 standard was ratified, and doesn't mention Intel C++.

The C++ Compiler Support page mentions "File system library", and says Intel Parallel STL support is "N/A", without mention of the Intel C++ compiler.

As for compiler settings, Intel C++ doesn't seem to offer a C++ Standard version as MSVC does.

Edit

I'm trying to avoid using the #define to suppress the deprecation of experimental header. I have tried using some #ifdefs to selectively #include based on compiler, but _MSC_VER is defined somehow (1920) when I have the compiler set to Intel C++.

vkn
  • 191
  • 12

0 Answers0