See this simple example,
constexpr auto f = [](const auto& foo){ foo.fun2(); }; struct Foo{ friend decltype(f); void fun1() const{ f