Untitled
unknown
plain_text
a year ago
300 B
3
Indexable
#include <iostream>
using namespace std;
template<typename T>
int Plus (const int a, T fp)
{
return fp(a);
}
int main ()
{
auto plus_one = [value=1] (const int x) -> int
{
return x + value;
};
int res= Plus (5, plus_one);
std::cout << res << std::endl;
return 0;
}Editor is loading...
Leave a Comment