-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.cpp
22 lines (17 loc) · 805 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "Tuple.hpp"
#include <assert.h>
#include <iostream>
int main() {
Tuple<char, int, char, int, char, double, char> tup{'a', 1, 'c', 3,
'd', 5.0, 'e'};
std::cout << "Size of out Tuple: " << sizeof(tup) << " Bytes" << std::endl;
std::tuple<char, int, char, int, char, double, char> std_tup{'a', 1, 'c', 3,
'd', 5.0, 'e'};
std::cout << "Size of out std::tuple: " << sizeof(std_tup) << " Bytes"
<< std::endl;
std::cout << "Actual size of data: "
<< 4 * sizeof(char) + 2 * sizeof(int) + sizeof(double) << " Bytes"
<< std::endl;
std::cout << get<2>(tup) << " == " << std::get<2>(std_tup) << std::endl;
assert(tup == std_tup);
}