PR c++/89387
* lambda.c (maybe_generic_this_capture): Don't check
DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
* g++.dg/cpp0x/lambda/lambda-89387.C: New test.
From-SVN: r269009
2019-02-19 Jakub Jelinek <jakub@redhat.com>
+ PR c++/89387
+ * lambda.c (maybe_generic_this_capture): Don't check
+ DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
+
PR c++/89391
* typeck.c (build_reinterpret_cast_1): Don't handle void to
&& conversion go through build_target_expr_with_type.
fns = TREE_OPERAND (fns, 0);
for (lkp_iterator iter (fns); iter; ++iter)
- if ((!id_expr || TREE_CODE (*iter) == TEMPLATE_DECL)
+ if (((!id_expr && TREE_CODE (*iter) != USING_DECL)
+ || TREE_CODE (*iter) == TEMPLATE_DECL)
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (*iter))
{
/* Found a non-static member. Capture this. */
2019-02-19 Jakub Jelinek <jakub@redhat.com>
+ PR c++/89387
+ * g++.dg/cpp0x/lambda/lambda-89387.C: New test.
+
PR c++/89391
* g++.dg/cpp0x/reinterpret_cast2.C: New test.
--- /dev/null
+// PR c++/89387
+// { dg-do compile { target c++11 } }
+
+template <template <typename, typename> class T>
+struct S {
+ using A = int;
+ using B = T<unsigned, A>;
+ using B::foo;
+ void bar () { [&] { foo (); }; }
+ void foo ();
+};