Boost.Any vs. Boost.Variant

the_drow picture the_drow · Sep 2, 2009 · Viewed 21.7k times · Source

I'm having trouble choosing between Boost.Any and Boost.Variant.
When should I use each one?

What are the advantages and disadvantages of each?

I am basically looking to store some states from external sources.

Answer

drby picture drby · Sep 2, 2009

Have you looked at the comparison in the variant library already?

(Not sure what states from external sources are, so it's kind of hard to say what's more appropriate for you.)