Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Template
#include <functional> template<class T> T testFunc(T t1, T t2, std::function<int(int, int)> func = [](T v1, T v2){return v1 < v2;}) { return func(t1, t2); } int main() { int a = 5, b = 10; testFunc(a, b); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
#10.1
ccloader
algorithm_1
inherited
virtual inheritance
Type deduction in VC++
10dan büyük mü küçük mü
throwing Copyable versus throwing MoveOnly
VS struct_member_name
ria
Please log in to post a comment.