Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
987 Views

"Error: type name is not allowed" after updating Visual Studio 2019

Jump to solution

Hi

I'm using Intel Parallel Studio XE 2020 with Visual Studio 2019.

Last night, after visual studio update to 16.7.1, when I compile any code having STL algorithm, a compilation error will occur. the sample code is:

 

 

#include <vector>
#include "algorithm"
int main()
{
    std::vector<int> data(100000);
    auto it = std::find(data.begin(), data.end(), 100);
    return 0;
}

 

 

And the compilation message is:

 

 

1>------ Build started: Project: Project3, Configuration: Debug Win32 ------
1>Source.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\xutility(63): error : type name is not allowed
1> return __builtin_bit_cast(_To, _Val);
1> ^
1>
1>compilation aborted for Source.cpp (code 2)
1>Done building project "Project3.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

 

Please guide me.

Thanks

0 Kudos

Accepted Solutions
Highlighted
Novice
780 Views
The problem has been solved by updating to 19.1 update 2.
Thank you

View solution in original post

0 Kudos
8 Replies
Highlighted
Moderator
943 Views

Hi,

Will you please confirm the compiler you are using. It seems that you are using Visual Studio Compiler.

Please select Intel C++ Compiler and try debugging your code. And let us know if you are having the same issue.



Warm Regards,

Abhishek


0 Kudos
Highlighted
Novice
931 Views

Thank you AbhishekD_Intel

But I exactly selected Intel Compiler (as shown in the image), with Visual Studio compiler it will run without any problem.

intel.jpg

 

When I switch to Visual Studio Build-Tolls 16.5, it works fine!

Do you think that is a bug in Intel Parallel Studio which is not compatible with new implementations in Visual Studio?

Note: I looked at the xutility file in two version of Visual Studio, It has major changes.

0 Kudos
Highlighted
Moderator
917 Views

Yes, that is most likely the case. It is not recommended to use VS versions that released after the compiler released (built) date, because we won't be able to validate that VS versions prior to releasing our compiler. Thanks,


0 Kudos
Highlighted
Moderator
885 Views

Hi,

Hope the details provided by Viet helped you. Please give us an update if you get the reason for such behavior.


Thank You,

Abhishek


0 Kudos
Highlighted
New Contributor I
806 Views

I tested the sample code with the latest version of Visual Studio 2019 (16.7.2) and with both Intel Compiler 19.0 and 19.1 Update 2

For sure 19.0 has some issues with the STL ( it is easy to patch the STL files to fix that) but I have no problems with 19.1 Update 2 and your sample code compiles without error using I9.1 Update 2.

You need to attach your vcxproj file to the bug report.

0 Kudos
Highlighted
New Contributor I
789 Views

Actually its very likely the OP was NOT using 19.1 Update 2

0 Kudos
Highlighted
Novice
781 Views
The problem has been solved by updating to 19.1 update 2.
Thank you

View solution in original post

0 Kudos
Highlighted
Moderator
745 Views

Hi,


As your issue is resolved we won't be monitoring this thread anymore. Kindly raise a new thread if you need further assistance


Warm Regards,

Abhishek


0 Kudos