0
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
| typedef int& int_ref;
typedef int* int_ptr;
class base
{
public:
base() {}
};
class derived : public base
{
public:
derived() {}
};
typedef derived* derived_ptr;
typedef derived& derived_ref;
int main()
{
char const char_obj = 0;
int const* const char_ptr = 0;
base const base_obj;
base const* const base_ptr = 0;
int_ref ref = int_ref(char_obj);
int_ptr ptr = int_ptr(char_ptr);
derived_ref drv_ref = derived_ref(base_obj);
derived_ptr drv_ptr = derived_ptr(base_ptr);
return 0;
} | |