c++ - Universal references with functions -
what type of "univ" in code below?
template<typename t> void func(t&& univ) { // ?? } int sum(int a, int b) { return a+b; } int main() { func(sum); }
i didn't know universal references worked functions. func(sum);
equivalent func(&sum);
or rvalue reference binding else simple pointer?
i don't know how put more words...
the type reference function taking 2 int
s , returning , int
or, comment says: int(&)(int, int)
Comments
Post a Comment