-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdemo-in-5.cpp
More file actions
33 lines (24 loc) · 824 Bytes
/
demo-in-5.cpp
File metadata and controls
33 lines (24 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <https://raw.githubusercontent.com/hsutter/misc/master/hst.h>
#include <string>
#include <algorithm>
#include <iostream>
void copy_from(auto...) { }
using String = hst::noisy<std::string>;
//------------------------------------------------------------------------------
// Proposed "new" in-parameter implementation -- scalable
//------------------------------------------------------------------------------
void new_in(in auto a, in auto b, in auto c, in auto d, in auto e, in auto f) {
copy_from(a, b);
copy_from(c);
copy_from(d, e, f);
}
int main() {
int i = 0;
String s, s2, s3;
hst::history = {}; // clear history
new_in(i, s, std::move(s2), s3, 42, String());
// a b
// c
// d e f
std::cout << hst::history;
}