Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Iterate_Variac_Template
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 #include <iostream> #include <cstdint> void printi(int a, int b, int c) { std::cout << a << "," << b << "," << c << std::endl; } template<int... II> struct AA { void printargs(int* args) { printi(args[II+1]...); //Here II will iterate through the arguments } }; int main() { struct AA<2,0,1> a; int args[] = {1,2,0, 5,9}; a.printargs(args); }
run
|
edit
|
history
|
help
0
VC++ fail
Overload resolve function pointer
parameter pack workaround
Code
Hangman
fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
ADL of operator expression & unqualified function call
Copy_and_base
Union and possible undefined behavior
Sum of numbers in a series using sum formular