[committed] libstdc++: Simplify variant access functions

Maciej Cencora m.cencora@gmail.com
Fri Oct 15 11:49:45 GMT 2021


Hi,

variant getter can be implemented in C++17 without using "recursive"
calls, but by generating a list of member pointers and applying them
with fold expression. Here's an example:

https://godbolt.org/z/3vcKjWjPG

Regards,
Maciej


More information about the Gcc-patches mailing list