Boost logo

Boost Users :

Subject: [Boost-users] switch_
From: MM (finjulhich_at_[hidden])
Date: 2015-09-25 08:34:34


I see Boost.Switch_ was provisionally accepted back inJan 2008.
I see some doc here:
http://dancinghacker.com/switch
But I can't see it released in recent boost versions

I need to select a type to dynamic_cast to based on a runtime index, so I
would have the type in a mpl::vector, and use the switch_ to pick up the
right type? I have under 20 types.

in pseudo c++11:

void f(std::size_t i, const T* obj)
{

typedef mpl::vector<T0, .... Tn> alltypes_t;

const auto* drvobj = dynamic_cast<...>(obj);
/// what do I set as arg of dynamic_cast

}

If switch_ can help, where do I get the code for it?

Rds,



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net