Questions tagged [boost-variant]

Boost.Variant is a C++ library containing a safe, generic, stack-based discriminated union container, offering a simple solution for manipulating an object from a heterogeneous set of types in a uniform manner.

Boost.Variant is a C++ library containing a safe, generic, stack-based discriminated union container, offering a simple solution for manipulating an object from a heterogeneous set of types in a uniform manner.

Whereas standard containers such as std::vector may be thought of as "multi-value, single type," boost::variant is "multi-type, single value."

317 questions
-4
votes
1 answer

Is boost::variant still used for new projects in the wild?

It's awful old, copyright 2003. It lists compatibility with GCC 3.1, and GCC 5.3 is out now. I want to use it, but I want to make sure it's still being maintained before I use it in my code base.
djhaskin987
  • 9,741
  • 4
  • 50
  • 86
-5
votes
1 answer

boost::variant - How to assign values

I have a boost variant and I want to assign values to it. The code looks like.. boost::variant ,std::vector > MyVariant; How can I assign values to, int, vector of ints and vector of floats. Simple assignment is not…
1 2 3
21
22