1 // PR c++/91844 - Implement CWG 2352, Similar types and reference binding.
2 // { dg-do compile { target c++11 } }
3 
4 template<typename T> int f (const T *const &); // 1
5 template<typename T> int f (T *const &); // 2
6 template<typename T> int f (T *); // 3
7 
8 /* There's an ambiguity: (2) is a better match than (1) because
9    (1) requires a qualification conversion whereas (2) doesn't, but
10    (2) and (3) are indistinguishable conversion sequences.  */
11 
12 void
g(int * p,const int * q,const int * const r)13 g (int *p, const int *q, const int *const r)
14 {
15   f (p); // { dg-error "call of overloaded" }
16   f (q);
17   f (r);
18 }
19