Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
c++functor
#include<iostream> class Func { public: void operator()(int num) { std::cout<< "Num: " << num << std::endl; } }; struct Bar { void operator()() { std::cout << "Bar" << std::endl; } }; int main() { Func foo; foo(5); Func()(5); Bar()(); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
success
MSVC alias template
pi
unresolved external symbol
Use std::is_base_of to subset STL container contents.
hangman
Error with move capture of a const ref in a lambda function
MSVC noexcept - works
error_check
find vs at
Please log in to post a comment.