- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have tried to use std::any class, but I cannot enable C++17 support for Intel Compiler.
If I use it with VC++ I have to enable Language->C++ Language Standard->ISO C++17 Standard (/std:c++17) then it works fine.
If I use Intel with this option it says: class any is only available with C++17:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include\any(14): error : #error directive: class any is only available with C++17.
if !_HAS_CXX17 #error class any is only available with C++17. #endif /* _HAS_CXX17 */
If I enable C++17 on C++->Language[Intel C++]-> C/C++ Language support->C++17 Support (/Qstd=c++17)
then I become error: icl: : error : '/Qstd:<arg>' conflicts with '/std:<arg>'
Command line:
/permissive- /Yu"stdafx.h" /GS /W3 /Zc:wchar_t /ZI /Od /Fd"Debug\vc141.pdb" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Zc:forScope /RTC1 /Gd /MDd /std:c++17 /FC /Fa"Debug\" /EHsc /nologo /Fo"Debug\" /Qstd=c++17 /Qprof-dir "Debug\" /Fp"Debug\anyintel.pch"
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you remove /std:c++17 from the command line?
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried all combinations. Without /std:c++17 and with /Qstd=c++17 comes:
#error class any is only available with C++17.
I use latest 2018.3 ICC with latest 15.7.4 VC.
Repro:
#include <any> int main() { std::any a; a = 42; return 0; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018 Update 3 was release on May-29-2018 but VS 15.7.4 was released a couple week later. So, if you try an older VS version (i.e 15.6*), you may not see the error.
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The same with 15.7.3. Could you provide some workaround?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem still exists with Intel 19.0 and VS 15.8.5. Is there a work-around available?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see https://software.intel.com/en-us/articles/intel-compilers-integration-support-for-microsoft-visual-studio-2017 for VS2017 versions support by Intel Compiler versions. Let's know if the problem still occurs within a VS2017 version that supports by Intel compiler version.
Thanks,
Viet

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page