updated for presentation

This commit is contained in:
Stephen M. McQuay
2012-05-25 08:17:47 -06:00
parent b47b5c6f35
commit 530ccb5e37
7 changed files with 62 additions and 45 deletions
+4 -14
View File
@@ -3,21 +3,11 @@
using namespace std;
auto some_func() -> tuple<int, int> {
return make_tuple(4, 2);
}
// tuple-returning func
int main() {
auto c = make_tuple(5, 4);
cout << get<0>(c) << endl;
int a = 0;
int b = 1;
tie(a, b) = make_tuple(b, a);
cout << a << endl;
cout << b << endl;
// make a tuple, get a value from it (silly <i> syntax)
// swap a and b
// get a,b from func ...
tie(a, b) = some_func();
cout << a << endl;
cout << b << endl;
}