Search code examples
c++xlc

IBM xlc compile fail with error message "The test "std::function" is unexpected


I use IBM xlc to compile C++ code but it failed with error message "The test "std::function" is unexpected. I use std::function in my code and add compile option "-qlanglvl=extended0x". The xlc version is 13.1. By the way, the same code is compiled successfully with G++.

Does anybody know the reason. Thanks.


Solution

  • The xlC compiler -qlanglvl=extended0x only has experimental C++11 support and is notably missing C++11 library. You need to move up to the V16 xlclang++ compiler or V17 ibm-clang++ compiler to get full C++11 support.