* init.c (get_nsdmi): Remember NSDMI instantiations. * parser.c (inject_this_parameter): Be more picky about current_class_ptr. * pt.c (tsubst_copy): Simplify 'this' handling. (tsubst_default_argument): Remember default argument instantiations. Take parameter number. (tsubst_default_arguments): Pass it. * call.c (convert_default_arg): Likewise. From-SVN: r251422
9 lines
186 B
C
9 lines
186 B
C
// PR c++/62155
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
template <typename T> struct S {
|
|
T i{[this] {}}; // { dg-error "cannot convert" }
|
|
};
|
|
|
|
S<int> s; // { dg-message "required" }
|