title: warning C4003: not enough actual parameters for macro 'min'
body: <p>I am working on an ATL COM dll in c++ and when I attempt to make use of a library I get a number of errors related to min/max such as this.  It also seems to cause a number of other errors though I imagine they are related to this.</p>
  
  <pre><code>1&gt;stdafx.cpp
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : warning C4003: not enough actual parameters for macro 'min'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(366) : warning C4003: not enough actual parameters for macro 'min'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(372) : warning C4003: not enough actual parameters for macro 'max'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : warning C4003: not enough actual parameters for macro 'max'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(378) : warning C4003: not enough actual parameters for macro 'max'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2059: syntax error : '('
  1&gt;        c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(413) : see reference to class template instantiation 'OpenMS::DPosition&lt;D&gt;' being compiled
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2059: syntax error : ')'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2143: syntax error : missing ')' before '?'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2143: syntax error : missing ';' before '?'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2574: 'OpenMS::DPosition&lt;D&gt;::DPosition(void)' : cannot be declared static
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2059: syntax error : '('
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2059: syntax error : ')'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2143: syntax error : missing ')' before '?'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2143: syntax error : missing ';' before '?'
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2574: 'OpenMS::DPosition&lt;D&gt;::DPosition(void)' : cannot be declared static
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(376) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
  1&gt;c:\dropbox\openms-1.6.0\include\openms\datastructures\dposition.h(364) : error C2059: syntax error : '('
  </code></pre>
  
  <p>the inline macro in this header is defined as:</p>
  
  <pre><code>    /// smallest positive
      inline static const DPosition
      min()
      {
        return DPosition(std::numeric_limits&lt;typename DPosition::CoordinateType&gt;::min());
      }
  </code></pre>
  
  <p>Anyway, I have read a number of posts on here that discuss this problem and indicate that I can use</p>
  
  <pre><code>#define NOMINMAX before #include "windows.h"
  </code></pre>
  
  <p>however this did not work and I still get the errors.  I do not want to have to modify the library as it is large and I would rather not have to have my project depend on a customized library so I would prefer some sort of solution that I can handle within my dll code.  What else can I do?</p>