Ticket #16638: PtrSize.cpp
File PtrSize.cpp, 401 bytes (added by , 4 years ago) |
---|
Line | |
---|---|
1 | #include <stdio.h> |
2 | #include <memory> |
3 | #include <private/shared/AutoDeleter.h> |
4 | #include <SupportDefs.h> |
5 | |
6 | struct Object { |
7 | int id; |
8 | }; |
9 | |
10 | int main() |
11 | { |
12 | Object *ptr1; |
13 | ObjectDeleter<Object> ptr2; |
14 | std::unique_ptr<Object> ptr3; |
15 | |
16 | printf("sizeof(ptr1): % " B_PRIuSIZE "\n", sizeof(ptr1)); |
17 | printf("sizeof(ptr2): % " B_PRIuSIZE "\n", sizeof(ptr2)); |
18 | printf("sizeof(ptr3): % " B_PRIuSIZE "\n", sizeof(ptr3)); |
19 | } |