Boost logo

Boost :

Subject: Re: [boost] Interest in a container which can hold multiple data types?
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-05-05 11:34:29


I read your post and poked around a little in your repo and didn't find the
answer to what to me is an obvious question.

If I have a need for this - and I have in the past, I've just used

#include <vector>
#include <boost/variant.hpp>

std::vector<
    boost::variant<type1, type2, ...>
> my_collection;

How is what you propose better than this? How is it different?

Robert Ramey

--
View this message in context: http://boost.2283326.n4.nabble.com/Interest-in-a-container-which-can-hold-multiple-data-types-tp4675019p4675104.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk