* call.c (involves_qualification_conversion_p): New function. (direct_reference_binding): Build a ck_qual if the conversion would involve a qualification conversion. (convert_like_real): Strip the conversion created by the ck_qual in direct_reference_binding. * g++.dg/cpp0x/ref-bind3.C: Add dg-error. * g++.dg/cpp0x/ref-bind4.C: New test. * g++.dg/cpp0x/ref-bind5.C: New test. * g++.dg/cpp0x/ref-bind6.C: New test. * g++.old-deja/g++.pt/spec35.C: Revert earlier change. From-SVN: r276251
13 lines
198 B
C
13 lines
198 B
C
// PR c++/91889 - follow-up fix for DR 2352.
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
template <typename T> struct A {
|
|
A(const T &);
|
|
};
|
|
|
|
struct {
|
|
int *m;
|
|
} a;
|
|
|
|
void fn1() { A<const int *>(a.m); }
|