Implementing a “variant” class

后端 未结 3 1866

Note: I\'m aware of boost::variant, but I am curious about the design principles. This question mostly for self-education.

Original post

<
3条回答
  •  广开言路
    2020-12-08 03:37

    At the risk of providing a non-answer, since you are already using Boost, I recommend you try Boost.Variant or Boost.Any instead of rolling your own implementation.

提交回复
热议问题