
29 Jun
2010
29 Jun
'10
3:42 p.m.
Mikhail Levin skrev:
Steven Watanabe
writes: I believe that ptr_map stores the key be value.
In Christ, Steven Watanabe
I see. Thank you.
It would be good to document this prominently, because it is natural to expect that ptr_map
stores Key*, since "a set can be seen as a map, where values are irrelevant" and ptr_set<Key> stores Key*.
It should be somewhat clear from the examples, and other documentation.
There are several options that you may employ:
A) use shared_ptr<const Key> as key
B) use std::map