- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Setting /permissive- switch on Windows causes some problems.
The code below compiles using the Microsoft Compiler Visual C++ 2017 15.8.2 both with AND without "/permissive-"
However the code fails to compile using Intel Compiler 2018 Update 3 with "/permissive-"
I have encountered many other issues when "/permissive-" is set when using the Intel Compiler.
error : identifier "silly" is undefined
1> silly tmp = something;
1> ^
1> detected during instantiation of class "CDataCacheGetFn<T1, T2, T3> [with T1=double, T2=silly, T3=double]" at line 33
1>
error : expected a ";"
1> silly tmp = something;
1> ^
1> detected during instantiation of class "CDataCacheGetFn<T1, T2, T3> [with T1=double, T2=silly, T3=double]" at line 33
template <class T1, class T2, class T3> class CDataCacheGetFn { public: T1 GetFn(const T2 &t2, const T3& t3, void *data)const; }; struct silly { }; double CDataCacheGetFn<double, silly, double>::GetFn(const silly &something, const double &f, void *)const { silly tmp = something; return 1.0; }
- 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
Hi,
Latest supported by Intel® C++ Compiler 18.0 Update 3 version of Microsoft Visual Studio 2017* is 15.6. Please use the supported version of Visual Studio and let us know if the problem still occurs.
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realized that the explicit instantiation of the function needs a template<> in front.
With that in place, there are no compiler errors from ICC
It's hard to avoid upgrading Visual Studio, and apart from this behavior I have no other issues using 2018 Update 3 with Visual Studio 15.8.
/permissive- was introduced in Visual Studio 2017 15.3 as per
https://blogs.msdn.microsoft.com/vcblog/2017/09/11/two-phase-name-lookup-support-comes-to-msvc/
Clearly ICC is taking notice of the /permissive- switch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would point out that clang returned a sensible error message. The error message from ICC was quite bizarre.
main.cpp:13:8: error: specializing member ‘CDataCacheGetFn<double, silly, double>::GetFn’ requires ‘template<>’ syntax double CDataCacheGetFn<double, silly, double>::GetFn(const silly &something, const double &f, void *)const

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