Friday, January 10, 2014

Use of _cpp_min gives error visual studio 20012 and visual studio 2013.

Problem :
Following code compiles in VS2008 but not in vs2013.
int a = 5; int b = 10;
std::_cpp_min(a, b);

Answer:
int a = 5; int b = 10;
(std::min)(a,b); //this should compile in both.


No comments:

Post a Comment