Boost logo

Boost Users :

Subject: Re: [Boost-users] Advise sought for container type
From: joel (joel.falcou_at_[hidden])
Date: 2009-08-30 13:47:36


Archie14 wrote:
> Well, how would I declare std::vector? std::vector<what>?
> Using boost::any will require me to do some sort of type discovery at run time.
> Thanks for pointing the boost::variant to me; that will work.
>
std::vector< boost::variant<GrassEater,MeatEater> > v;

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

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