libStatGen Software 1
Generic.cpp
1/*
2 * Copyright (C) 2010 Regents of the University of Michigan
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "Generic.h"
19
20#if defined(TEST)
21
22#include <iostream>
23#include <list>
24#include <utility>
25#include <vector>
26
27//
28// g++ -g -o testGeneric -DTEST Generic.cpp
29//
30int main(int argc, const char **argv)
31{
32 std::vector<int> a;
33 std::vector< std::pair<int, int> > b;
34 std::pair<int, int> c;
35
36 std::vector<int>::iterator i;
37
38 a.push_back(0);
39 a.push_back(1);
40 a.push_back(2);
41 a.push_back(3);
42
43 std::cout << a;
44
45 c.first = 10;
46 c.second = 20;
47 b.push_back(c);
48 b.push_back(c);
49 b.push_back(c);
50
51 std::cout << b;
52
53 i = a.begin();
54
55 std::list<std::pair<int, int> > l;
56
57 l.push_back(c);
58
59 std::cout << l;
60
61// std::cout << "iterator i: " << i << std::endl;
62
63// std::cout << argv;
64}
65
66#endif