This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Any variant class?
- From: Tim Shen <timshen at google dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 23 Feb 2015 22:55:58 -0800
- Subject: Any variant class?
- Authentication-results: sourceware.org; auth=none
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