Visual Studio 2015 Preview, STL/QUEUE Error

  • Thread starter Thread starter Reza Bemanian
  • Start date Start date
R

Reza Bemanian

Guest
It seems adding a STL queue container does not work for the C++ projects, causing compiler errors when only the queue header file is included, and corrected when the include statement is removed.

#include <queue>

Generated Errors by the Complier

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\queue(14): error C2059: syntax error: namespaceWithin queue header file
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\queue(14): error C2334: unexpected token(s) preceding {; skipping apparent function body

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\queue(453): error C2059: syntax error: namespace
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\queue(453): error C2334: unexpected token(s) preceding {; skipping apparent function body

Which refer to the following code snippets within the header file queue

_STD_BEGIN

and

_STD_END

I am not sure why this code segment was tried to be separated from the rest using the above #defines, is there a bug in the compiler by seeing the same namespace definition cascaded one after another (not likely), or if the __cplusplus #define placed within yvals.h header file is seen by the compiler when reached to #if defined(__cplusplus)? My initial inclination was the working merits of the STL within this VS released version as a whole, which is not the case since I have experienced no problems using the deque or vector STL elements within the same code. Any hint or suggestions.

Regards,

AliReza Bemanian, Ph.D.

Continue reading...
 
Back
Top