This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Any variant class?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]