Vector Class Discussion

 
thread NOMINMAX needed with Visual Studio and Windows.h - Paul Jurczak - 2013-09-15
last reply NOMINMAX needed with Visual Studio and Windows.h - Agner - 2013-09-16
 
NOMINMAX needed with Visual Studio and Windows.h
Author:  Date: 2013-09-15 19:44
Hi Agner,

Firstly, thank you for excellent work on various aspects of optimization. I just wrote my first test program with Vector Class. I'm using Visual Studio 2013 RC and I have to include Windows.h for some dependencies I need. I noticed that Vector Class will not compile unless NOMINMAX is set.

Paul

   
NOMINMAX needed with Visual Studio and Windows.h
Author: Agner Date: 2013-09-16 01:03
Thanks for the tip. I will fix this in the next version of vectorclass by defining NOMINMAX if _MSC_VER is defined, or undefining the min and max macros if windows.h is included first. Macros with common names are a bad thing in C++.