diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 4ec2960525..d4ff7c5ebc 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -85,6 +85,14 @@ def cxx14_flag(self): else: return "-std=c++14" + @property + def cxx17_flag(self): + # https://www.intel.com/content/www/us/en/developer/articles/news/c17-features-supported-by-c-compiler.html + if self.real_version < Version("19"): + raise UnsupportedCompilerFlag(self, "the C++17 standard", "cxx17_flag", "< 19") + else: + return "-std=c++17" + @property def c99_flag(self): if self.real_version < Version("12"):