-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.cpp
36 lines (30 loc) · 1.19 KB
/
Test.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
//============================================================================
// Name : Test.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C, Ansi-style
//============================================================================
#include <iostream>
#include <type_traits>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
class A {};
int main()
{
std::cout << std::boolalpha;
std::cout << std::is_fundamental<A>::value << '\n';
std::cout << std::is_fundamental<int>::value << '\n';
std::cout << std::is_fundamental<int&>::value << '\n';
std::cout << std::is_fundamental<int*>::value << '\n';
std::cout << std::is_fundamental<float>::value << '\n';
std::cout << std::is_fundamental<float&>::value << '\n';
std::cout << std::is_fundamental<float*>::value << '\n';
std::cout << std::is_fundamental<short unsigned int>::value << '\n';
std::cout << "size_t:" << sizeof(size_t) << std::endl;
std::cout << "long long:" << sizeof(long long) << std::endl;
std::cout << "uint16_t:" << sizeof(uint16_t) << std::endl;
std::cout << "bool:" << sizeof(bool) << std::endl;
return 0;
}