-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
32 lines (27 loc) · 1.33 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
#include "vector.hpp"
int main() {
using myVec = khzmp::vector<int, char, long>;
static_assert(myVec::size == 3U);
static_assert(std::is_same_v<myVec::head, int>);
static_assert(std::is_same_v<myVec::tail, khzmp::vector<char, long>>);
static_assert(std::is_same_v<myVec::tail::tail, khzmp::vector<long>>);
static_assert(std::is_same_v<myVec::tail::tail::tail, khzmp::vector<>>);
using myVec_push_back = khzmp::push_back_t<myVec, short>;
static_assert(std::is_same_v<
myVec_push_back,
khzmp::push_back_t<khzmp::vector<int, char, long>, short>>);
static_assert(myVec_push_back::size == 4U);
static_assert(
std::is_same_v<myVec_push_back, khzmp::vector<int, char, long, short>>);
static_assert(khzmp::contains_v<myVec_push_back, short>);
using myVec_pop_front = khzmp::pop_front_t<myVec>;
static_assert(std::is_same_v<myVec_pop_front, khzmp::vector<char, long>>);
using myVec_push_front = khzmp::push_front_t<myVec, short>;
static_assert(myVec_push_front::size == 4U);
static_assert(
std::is_same_v<myVec_push_front, khzmp::vector<short, int, char, long>>);
static_assert(khzmp::contains_v<myVec_push_front, short>);
using myVec_filter_char = khzmp::filter_not_t<myVec, char>;
static_assert(myVec_filter_char::size == 2U);
static_assert(std::is_same_v<myVec_filter_char, khzmp::vector<int, long>>);
}