view gcc/testsuite/g++.dg/cpp1y/lambda-generic-78018.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/78018
// { dg-do compile { target c++14 } }

struct A
{
    void f1();

    template <typename F>
    void f2(F f);

    template<typename T>
    void f3(T t);
};

struct B
{
    template<typename L>
    void f(L) { }
};

void A::f1()
{
    f2([&] (auto t) { f3(t); } );
}

template <typename F>
void A::f2(F f)
{
    B b;
    f(b);
}

template<typename T>
void A::f3(T t)
{
}