我正在尝试交换参数包的两个项目.
理想情况下,我想做这样的事情:
template<int i1, int i2, class... Args>
void swapped_copy(some_class a, some_class b, Args... args) {
a(args...) = b(/* 'args...' where parameters with indices i1 and i2 are swapped */);
}
Run Code Online (Sandbox Code Playgroud)
任何的想法?
非常感谢.