I have a very simple test program which does not actually do anything:
#include <iostream>
int main() { }
Compiling this with the following command gives me a very long error message:
icpc test.cpp
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm(640),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string(57),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view(175),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string(506),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale(14),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios(215),
from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream(37),
from main.cpp(1):
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits(1041): error: function call is not allowed in a constant expression
__is_function(_Tp)
^
It seems something is incorrectly configured, but I cannot figure out what it is.
Here is some version info:
$ icpc --version
icpc (ICC) 19.1.3.301 20200925
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
$ /usr/bin/xcodebuild -version
Xcode 13.3.1
Build version 13E500a
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 12.3.1 (21E258)
Kernel Version: Darwin 21.4.0
Processor Name: 12-Core Intel Xeon E5
Processor Speed: 2,7 GHz
Number of Processors: 1
Total Number of Cores: 12
...