08_1

 1 template <typename T>
 2 class List      // 一个 namespace scope class template
 3 {
 4 public:
 5     template <typename T2>  // 一个 member function template
 6     List (List<T2> const&); // (这是个建构式)
 7     ...
 8 };
 9
10 template <typename T>
11 template <typename T2>
12 List<T>::List (List<T2> const& b)   // 一个定义于 class 外的 member function template
13 {
14     ...
15 }
16
17 template <typename T>
18 int length (List<T> const&);    // 一个 namespace scope function template
19
20 class Collection
21 {
22     template <typename T>   // 一个定义于 class 内的 member class template
23     class Node
24     {
25         ...
26     };
27
28     template <typename T>   // 又一个 member class template,无定义
29     class Handle;
30
31     template <typename T>   // 一个定义于 class 内的 member function template
32     T* alloc()              // 隐寓为 inline
33     {
34         ...
35     }
36     ...
37 };
38
39 template <typename T>   // 一个定义于 class 外的 member class template
40 class Collection::Handle
41 {
42     ...
43 };
时间: 2024-08-08 14:13:31

08_1的相关文章

Python 数据清洗--处理Nan

参考:http://blog.sina.com.cn/s/blog_13050351e0102xfis.html https://www.sogou.com/link?url=DOb0bgH2eKh1ibpaMGjuy-bS_O7xQYLPIOogrOFmc02ueKW9M67CaVLpMY1k7wxTCB1NmnNSzM-t5pUc3zy0dg.. https://www.sogou.com/link?url=DOb0bgH2eKh1ibpaMGjuy6YnbQPc3cuKWH5w_8iuvJ