|
|
|
|
|
by busrf
2020 days ago
|
|
I actually think the last version, using a single lambda with constexpr ifs inside, looks completely reasonable. But yeah the first time I had to use boost::variant (which is what the version in the standard library is based on) I thought the visitor was too much boilerplate. Things have gotten better since then, but many people are not even on C++17 yet ): |
|