When getting the max var, what's difference between using function and macro
<p>reading combase.cpp code, I find following:</p>

<pre><code>/* We have to ensure that we DON'T use a max macro, since these will typically   */                    
/* lead to one of the parameters being evaluated twice.  Since we are worried    */                    
/* about concurrency, we can't afford to access the m_cRef twice since we can't  */                    
/* afford to run the risk that its value having changed between accesses.        */                    

    template&lt;class T&gt; inline static T ourmax( const T &amp; a, const T &amp; b )                                   
    {
        return a &gt; b ? a : b;       
    } 
</code></pre>

<p>I don't understand why "max macro leads to one of the parameters being evaluated twice"?</p>
