Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
for_each_argument
#include <functional> #include <iostream> using namespace std; template <typename F, typename... Args> void for_each_argument(F f, Args&&... args) { using t = int[sizeof...(Args)]; (void)t{(f(forward<Args>(args)), 0)...}; } struct print { template <typename T> void operator()(const T& x) const { cout << x << endl; } }; int main() { for_each_argument(print(), 10, "Hello", 42.5); }
run
|
edit
|
history
|
help
2
Segment Tree Impl
6 14 15 17 21 33 29
specialized template
Pointer array
Throttle Example using circular queue (push all but 2 less than maxSize; then pop all but 2 less than current size)
7
How to test call member?
Graphs Iteration2 Directed Graphs
Non type template argument
regex