Why cannot a C++ compiler deduce the type of the lambda argument?

前端 未结 0 1521
-上瘾入骨i
-上瘾入骨i 2020-11-29 21:21

I\'ve got the following code, which can\'t be compiled

template 
void call_with(std::function f, T val) {
    f(val);
}

int          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题