static_assert dependent on non-type template parameter (different behavior on gcc and clang)

Both compilers are correct. From [temp.res]/8: If no valid specialization can be generated for a template, and that template is not instantiated, the template is ill-formed, no diagnostic required. There does not exist a valid specialization that can be generated from the primary template Hitchhiker, so it is ill-formed, no diagnostic required. clang chooses to … Read more