<html>#2315: Issues compiling with gcc7.3 with c++17
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Samuel Tootle</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>open</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td>ET_2016_11</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Carpet</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>I get the same errors as you (gcc 7.5 as above) when compiling CarpetIOASCII. Before I had only compiled CarpetLib which compiles fine and thus I had not notice this, sorry. The error goes away when changing -<code>std=gnu++17</code> to <code>-std=gnu++11</code>.</p>
<p>Indeed a fix is to prefix the <code>*(data&lt;T&gt;*)foo</code> casts by <code>CarpetLib::</code> to indicate the explicit namespace since the compiler cannot deduce the template based on function arguments. </p>
<p>This pull request implements the required changes, though there may be better ways to solve this:</p>
<p><a data-is-external-link="true" href="https://bitbucket.org/eschnett/carpet/pull-requests/32/rhaas-c-17/diff" rel="nofollow">https://bitbucket.org/eschnett/carpet/pull-requests/32/rhaas-c-17/diff</a></p>
<p>With these changes I can compile your thornlist using <code>std=gnu++17</code> and gcc-7.5.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2315/issues-compiling-with-gcc73-with-c-17'>https://bitbucket.org/einsteintoolkit/tickets/issues/2315/issues-compiling-with-gcc73-with-c-17</a></p>
</html>