Boost.Any vs. Boost.Variant

强颜欢笑 提交于 2019-12-31 08:41:09

问题


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.


回答1:


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.)



来源:https://stackoverflow.com/questions/1366524/boost-any-vs-boost-variant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!