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
MSVC C2888 bug
VC++ error LNK2001 with combined use of non-type template parameters
VC++ error C2440 with combined use of non-type template parameters
_countof constexpr
C++ standard library formatted input hexadecimal float without prefix or exponent test case
3 sayinin toplami
VS struct name enumerate
bad_cast
#33
const reference life time extension