Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
There is an error occurred when I included the "istream" of VC2019.
How to solve this?

Error detail:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\istream(884,1): error C2947: <pre>expecting '>' to terminate construct, found 'syntax'


LN884:
template <class _Istr, class _Ty>
struct _Can_stream_in<_Istr, _Ty, void_t<decltype(_STD declval<_Istr&>() >> _STD declval<_Ty>())>> : true_type {};


What I have tried:

I compared this file between VC2015 and VC2019.
_Can_stream_in
is not defined in VC2015
Posted
Updated 25-Nov-21 21:09pm
Comments
phil.o 26-Nov-21 3:11am    
I would check both C and C++ language standards used in both projects, and see whether they match.

1 solution

It is more likely that you have an error in your source file before the #include line, or another missing include. If you can demonstrate conclusively that it is in the istream header then you should report it to Microsoft.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900