// { dg-do compile } // Contributed by: Giovanni Bajo // DR 49: Non-constant pointers are invalid template arguments. template struct R { /* ... */ }; template struct S { /* ... */ }; int p; template struct R<&p>; // OK template struct S<&p>; // OK due to parameter adjustment int *ptr; template struct R; // { dg-error "argument" } template struct S; // { dg-error "argument" } int v[5]; template struct R; // OK due to implicit argument conversion template struct S; // OK due to both adjustment and conversion