https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85809
Bug ID: 85809 Summary: SFINAE code compiles that shouldn't be able to compile. Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: viktorzoutman at vzout dot com Target Milestone: --- The following SFINAE code shouldn't be able to compile as far as I'm aware. However it does compile on gcc: https://godbolt.org/g/D5BkWf The interesting thing is if you comment out line 25 it gives an error as it should. But line 25 doesn't have anything to do with the incorrect code. As you can see in the following code example: https://godbolt.org/g/azEvKp