-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
33 lines (30 loc) · 1.67 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
#include <iostream>
#include <vector>
#include <janor/type_traits.hpp>
void funct(){
}
int main()
{
std::string name = "Norris";
const std::string const_name = "Janor";
std::vector<int> numbers;
std::size_t norris = 89;
auto num = 184467440737095516;
int numm = 55;
int* p_num = &numm;
int& r_num = numm;
int&& rr_num = 999;
std::cout<<"is_string --- "<<(janor::is_string<decltype(name)>::value ? "True":"False")<<'\n';
std::cout<<"is_string --- "<<(janor::is_string<decltype(const_name)>::value ? "True":"False")<<'\n';
std::cout<<"is_void --- "<<(janor::is_void<decltype(funct())>::value ? "True":"False")<<'\n';
std::cout<<"is_vector --- "<<(janor::is_vector<decltype(numbers)>::value ? "True":"False")<<'\n';
std::cout<<"is_int --- "<<(janor::is_int<decltype(norris)>::value ? "True":"False")<<'\n';
std::cout<<"is_32bit_int --- "<<(janor::is_32bit_int<decltype(norris)>::value ? "True":"False")<<'\n';
std::cout<<"is_64bit_int --- "<<(janor::is_64bit_int<decltype(norris)>::value ? "True":"False")<<'\n';
std::cout<<"is_64bit_int --- "<<(janor::is_64bit_int<decltype(num)>::value ? "True":"False")<<'\n';
std::cout<<"is_pointer --- "<<(janor::is_pointer<decltype(p_num)>::value ? "True":"False")<<'\n';
std::cout<<"is_reference --- "<<(janor::is_reference<decltype(r_num)>::value ? "True":"False")<<'\n';
std::cout<<"is_rvalue_reference --- "<<(janor::is_rvalue_reference<decltype(static_cast<int&&>(999))>::value ? "True":"False")<<'\n';
std::cout<<"is_rvalue_reference --- "<<(janor::is_rvalue_reference<decltype(rr_num)>::value ? "True":"False")<<'\n';
std::cout<<"is_rvalue_reference --- "<<(janor::is_rvalue_reference<decltype(std::move(numm))>::value ? "True":"False")<<'\n';
}