Boost logo

Boost Users :

Subject: [Boost-users] [ptr_container] Abstract Key type in ptr_map<Key, Val> impossible?
From: Mikhail Levin (svarneticist_at_[hidden])
Date: 2010-06-27 22:39:05


Hello,

The following code would not compile.

struct Key {
bool operator<(const Key&) const;
   virtual void blah() const = 0;
};

struct Val {
   /* */
};

boost::ptr_map<Key, Val> map;

Although
boost::ptr_set<Key> set;
seems to work.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net