@@ -2423,7 +2423,7 @@ maybe_dummy_object (tree type, tree* binfop)
else if (current != current_class_type
&& context == nonlambda_method_basetype ())
/* In a lambda, need to go through 'this' capture. */
- decl = (cp_build_indirect_ref
+ decl = (build_x_indirect_ref
((lambda_expr_this_capture
(CLASSTYPE_LAMBDA_EXPR (current_class_type))),
RO_NULL, tf_warning_or_error));
new file mode 100644
@@ -0,0 +1,13 @@
+// PR c++/48523
+// { dg-options -std=c++0x }
+
+template<typename>
+struct X
+{
+ bool b;
+
+ void f()
+ {
+ [this]{ return b; };
+ }
+};