Any variant class?

Tim Shen timshen@google.com
Tue Feb 24 06:56:00 GMT 2015


Hi there,

I'm recently refactoring <regex>, and one of the problem needs to be
solved is stack overflow due to deep recursion.

I plan to solve this by using a heap allocated stack. Ideally it will
be `std::stack<_Variant<...>>` or `std::unique_ptr<_Variant<...>[]>`.
I don't think we have an existing variant class that can be used?

If there's no, I'm gonna write one. Is there any benefit of making a
boost::variant-ish one, or otherwise I can design my own interface?

Thanks!


-- 
Regards,
Tim Shen



More information about the Libstdc++ mailing list