[ET Trac] #2951: Cottonmouth uses `max()` unqualified without a using declaration
Maxwell Rizzo
trac-noreply at einsteintoolkit.org
Wed May 27 12:25:13 CDT 2026
#2951: Cottonmouth uses `max()` unqualified without a using declaration
Reporter: Maxwell Rizzo
Status: new
Milestone:
Version:
Type: bug
Priority: major
Component: EinsteinToolkit thorn
CottonmouthZ4c4m/src/CottonmouthZ4c4m_z4c_enforce_pt1.cpp
CottonmouthBSSNOK4m/src/CottonmouthBSSNOK4m_enforce_pt1.cpp
both files have unqualified calls of the `max()` function. Both have the same using statement on line 41,
```
using std::cbrt,std::fmax,std::fmin,std::sqrt;
```
`fmax` being unused in both files maybe suggests that this `std::fmax` should be `std::max`, as it is generated code it isn't clear if this is a human error or an issue with the generation.
Cottonmouth fails to compile on Anvil with error
```
error: 'max' was not declared in this scope
```
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2951/cottonmouth-uses-max-unqualified-without-a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/trac/attachments/20260527/bde55402/attachment.htm>
More information about the Trac
mailing list