Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Well, this is more a review of the c++ implementation but thanks anyway. I'm not sure I completely understand point 1. Do you mean using something like std::unique_ptr< E >?
    – stijn
    Commented Jul 13, 2015 at 14:04
  • Yes, that's a possibility. Though better take a look at how Boost.Variant is implemented, and start from there, for small-object-optimization (avoiding dynamic allocation) and to also incorporate point 2. Commented Jul 13, 2015 at 14:20