2 // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR 49: Non-constant pointers are invalid template arguments.
5 template<int *a> struct R { /* ... */ };
6 template<int b[5]> struct S { /* ... */ };
9 template struct R<&p>; // OK
10 template struct S<&p>; // OK due to parameter adjustment
13 template struct R<ptr>; // { dg-error "constant" }
14 template struct S<ptr>; // { dg-error "constant" }
17 template struct R<v>; // OK due to implicit argument conversion
18 template struct S<v>; // OK due to both adjustment and conversion