Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Unicode_write2file
not a parameter pack
typeid VC++
Default constructor - deleted
timeConversion
Wide string conversion with multibyte chars
Waiting for Multiple Objects
dharm1
iota_30-Seconds-of-C++
Hangman