std::function<int(int)> f = [&](int c)->int{
        --c;
        //call function
        //print function address static_cast<void*>(&f)
        return c <= 0 ? 0 : f(c);
    };

    f(2);

相关文章:

  • 2019-12-17
  • 2022-12-23
猜你喜欢
  • 2021-09-25
  • 2021-04-01
  • 2022-12-23
  • 2021-10-08
相关资源
相似解决方案