<html>#2951: Cottonmouth uses `max()` unqualified without a using declaration
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Maxwell Rizzo</td></tr>
<tr><td style='text-align:right'> Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td></td></tr>
<tr><td style='text-align:right'> Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>EinsteinToolkit thorn</td></tr>
</table>
<p>CottonmouthZ4c4m/src/CottonmouthZ4c4m_z4c_enforce_pt1.cpp
CottonmouthBSSNOK4m/src/CottonmouthBSSNOK4m_enforce_pt1.cpp</p>
<p>both files have unqualified calls of the <code>max()</code> function. Both have the same using statement on line 41,</p>
<div class="codehilite"><pre><span></span><code><span class="nt">using</span> <span class="nt">std</span><span class="p">::</span><span class="nd">cbrt</span><span class="o">,</span><span class="nt">std</span><span class="p">::</span><span class="nd">fmax</span><span class="o">,</span><span class="nt">std</span><span class="p">::</span><span class="nd">fmin</span><span class="o">,</span><span class="nt">std</span><span class="p">::</span><span class="nd">sqrt</span><span class="o">;</span>
</code></pre></div>
<p><code>fmax</code> being unused in both files maybe suggests that this <code>std::fmax</code> should be <code>std::max</code>, as it is generated code it isn't clear if this is a human error or an issue with the generation.</p>
<p>Cottonmouth fails to compile on Anvil with error</p>
<div class="codehilite"><pre><span></span><code>error: 'max' was not declared in this scope
</code></pre></div>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2951/cottonmouth-uses-max-unqualified-without-a'>https://bitbucket.org/einsteintoolkit/tickets/issues/2951/cottonmouth-uses-max-unqualified-without-a</a></p>
</html>