-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
42 lines (37 loc) · 1.66 KB
/
main.cpp
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
34
35
36
37
38
39
40
41
42
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mli <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/20 16:59:05 by mli #+# #+# */
/* Updated: 2021/01/30 15:55:39 by mli ### ########.fr */
/* */
/* ************************************************************************** */
#include "vector.hpp"
#include <vector>
#ifndef TESTED_NAMESPACE
# define TESTED_NAMESPACE ft
#endif
#define TESTED_TYPE int
template <typename T>
void printSize(TESTED_NAMESPACE::vector<T> const &vct, bool print_content = 1)
{
std::cout << "size: " << vct.size() << std::endl;
std::cout << "capacity: " << vct.capacity() << std::endl;
std::cout << "max_size: " << vct.max_size() << std::endl;
if (print_content)
{
typename TESTED_NAMESPACE::vector<T>::const_iterator it = vct.begin();
typename TESTED_NAMESPACE::vector<T>::const_iterator ite = vct.end();
std::cout << std::endl << "Content is:" << std::endl;
for (; it != ite; ++it)
std::cout << "- " << *it << std::endl;
}
std::cout << "###############################################" << std::endl;
}
int main(void)
{
return (0);
}