MT

#include <iostream>
using namespace std;
template <class T>
void foo2(T&& smth)
{
cout<<smth+smth<<endl;
}
template <class ... Args>
void foo1(Args&& ... args)
{
(..., (foo2(args)));
}
int main()
{
foo1(2, 3.14, "hello"s);
return 0;
}
Size: a a a
MT

#include <iostream>
using namespace std;
template <class T>
void foo2(T&& smth)
{
cout<<smth+smth<<endl;
}
template <class ... Args>
void foo1(Args&& ... args)
{
(..., (foo2(args)));
}
int main()
{
foo1(2, 3.14, "hello"s);
return 0;
}
AM
auto f = []<typename... Args>(Args... args) -> std::ostream& {
return (std::cout << ... << args);
};
f(1, 2, "hello") << std::endl;
f(3, 4) << std::endl;12hello
34
I
S
I
N)

N)
N)
AB
N)
AM

N)

N)
N)

N)

AT
AT

N)
AT

AT
