$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.