bootstrap: Fix support for Intel compiler with modern GNU system compiler
On systems with older GNU system compilers, the Intel C++ compiler does
not define __cplusplus
to any version newer than C++11. This
prevented bootstrap
from detecting that a given C++ standard flag has
enabled C++17 mode in the compiler. In !4139 (merged) we added a preprocessor condition to attempt to
detect C++17 mode in the Intel compiler on such systems by looking
for __cpp_if_constexpr
. However, on systems with a modern GNU
system compiler, that definition is available even in C++11 mode.
Switch to using __cpp_deduction_guides
to detect C++17 mode for the
Intel C++ compiler. That seems to be defined exclusively in C++17 mode
regardless of the version of the system compiler.
Fixes: #21013 (closed)
Backport: release