dimanche 23 octobre 2016

What are the differences between std::variant and boost::variant?

In an answer to

What is the equivalent of boost::variant in the C++ standard library?

it is mentioned that boost::variant and std::variant differ somewhat.

  • What are the differences, as far someone using these classes is concerned?
  • What should I watch out for when coding with either of these, to maintain maximum compatibility with switching to the other one?

(the motivation is using boost::variant in pre-C++17 code)

Aucun commentaire:

Enregistrer un commentaire