回答編集履歴
1
追記
answer
CHANGED
@@ -14,4 +14,19 @@
|
|
14
14
|
using std::map<int, MapA*>::map;
|
15
15
|
};
|
16
16
|
```
|
17
|
-
[wandbox](https://wandbox.org/permlink/Il71dOufZ3XQ36x9)
|
17
|
+
[wandbox](https://wandbox.org/permlink/Il71dOufZ3XQ36x9)
|
18
|
+
|
19
|
+
---
|
20
|
+
【追記】
|
21
|
+
イテレータへの応用です。(typedefを使って、綺麗にかけそうな気もするのですが思いつかない。)
|
22
|
+
```
|
23
|
+
struct IteratorB;
|
24
|
+
struct IteratorA : public std::map<int, IteratorB*>::iterator
|
25
|
+
{
|
26
|
+
using std::map<int, IteratorB*>::iterator::iterator;
|
27
|
+
};
|
28
|
+
struct IteratorB : public std::map<int, IteratorA*>::iterator
|
29
|
+
{
|
30
|
+
using std::map<int, IteratorA*>::iterator::iterator;
|
31
|
+
};
|
32
|
+
```
|