#2315: Issues compiling with gcc7.3 with c++17
Reporter:Samuel Tootle
Status:open
Milestone:
Version:ET_2016_11
Type:bug
Priority:minor
Component:Carpet

Comment (by Roland Haas):

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 -std=gnu++17 to -std=gnu++11.

Indeed a fix is to prefix the *(data<T>*)foo casts by CarpetLib:: to indicate the explicit namespace since the compiler cannot deduce the template based on function arguments.

This pull request implements the required changes, though there may be better ways to solve this:

https://bitbucket.org/eschnett/carpet/pull-requests/32/rhaas-c-17/diff

With these changes I can compile your thornlist using std=gnu++17 and gcc-7.5.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2315/issues-compiling-with-gcc73-with-c-17