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
Maciej Cencora via Gcc-patches Fri, 15 Oct 2021 04:50:07 -0700
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