mpark / variant

C++17 `std::variant` for C++11/14/17
https://mpark.github.io/variant
Boost Software License 1.0
659 stars 88 forks source link

missing type_switch #1

Closed viboes closed 8 years ago

viboes commented 8 years ago

Hi Michael, I was looking for type_switch and I was unable to find it. Have you implemented it?

mpark commented 8 years ago

Hi @viboes, I had type_switch before when I was implementing P00080R0. Since I'm now implementing the Kona variant, I've implemented visit instead.

viboes commented 8 years ago

Could you point me to your old implementation of type_switch? In which file it was?

Vicente Botet

mpark commented 8 years ago

The P0080R0 implementation is at this commit. type_switch in specific is here.

viboes commented 8 years ago

Thanks. I don't see how the customization is done?

mpark commented 8 years ago

@viboes: I didn't go as far as to introduce a generalized type_switch like your match in P0050R0. My focus was on exploring what the type_switch syntax would look like, and which variant specific parts will need to be supported.

viboes commented 8 years ago

No problem. I was curious to see your implementation.