Closed mrzv closed 5 years ago
@mrzv: My guess would be that this is for ICC running on Windows? Is that right?
@mpark Nope, Linux.
Hm... I'm not able to repro it on Godbolt although the exact compiler version you mentioned isn't available on Godbolt. I'm testing with 18.0.0, 19.0.0 and 19.0.1.
Based on the error message you posted, the error seems to be that the conditional define for MPARK_RETURN_TYPE_DEDUCTION
is evaluating to true
when it shouldn't.
The condition is defined(__cpp_return_type_deduction) || defined(_MSC_VER)
, so unless __cpp_return_type_deduction
is set incorrectly (I don't think this is the case...) or _MSC_VER
is set because ICC is pretending to be MSVC.
Could you check if _MSC_VER
is set under your config for some reason?
Running the following input through the compiler
#ifdef _MSC_VER
#pragma message "MSC_VER"
#else
#pragma message "No MSC_VER"
#endif
#ifdef __cpp_return_type_deduction
#pragma message "__cpp_return_type_deduction"
#else
#pragma message "No __cpp_return_type_deduction"
#endif
prints
No MSC_VER
__cpp_return_type_deduction
Ah, I figured it out. I've been doing all of this on a super-computer, which uses a module system. The GCC module is not loaded by default, but the Intel compiler relies on the GCC standard library to work correctly. Loading the gcc module fixes the problem. My bad; thanks for looking into it.
Ah.. interesting. So without the GCC module ICC defines __cpp_return_type_deduction
under C++11 mode 🤔 that's odd. But okay, I'll close this.
@mrzv What supercomputer site is this? They probably need to set -gcc-name
and such inside of their icpc.cfg
file which corresponds to the requisite GCC version. This is important, as the Intel compilers definitely have restrictions on which gcc headers they'll work with.
This is unrelated to the issue, of course, but figured I'd leave it out in the open in case it is helpful.
The following simplest example:
fails to compile with the Intel compiler if I pass it
-std=c++11
, but compiles fine, if I give it-std=c++14
. It compiles in C++11 mode with GCC and Clang.The compiler version is:
The error it reports: