|
Boost Users : |
Subject: [Boost-users] Advise sought for container type
From: Archie14 (admin_at_[hidden])
Date: 2009-08-30 12:31:49
given the class like the one below:
template <typename T> class animal
{
public:
animal (const char* ofname) : _name(ofname) {}
private:
typedef T _T;
std::string _name;
_T behavior;
}
class MeatEater {};
class GrassEather {};
animal<MeatEater> bear ("bear");
animal<GrassEater> rabbit ("rabbit");
How to store "bear" and "rabbit" instances in a vector?
Advise is greatly appreciated.
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