----- Mensaje original -----
De: Francesco Biscani
Hello,
is there a way to retrieve from a multiIndex container the type of its content?
I need to do something like this:
template <class T> class my_class { private: T set;
public: void insert(const T::value_type &); <------ ? };
Here T is a multiIndex container, and the insert function should add a term to the set. Hence "insert" must accept as input the kind of values that are stored in the multiIndex container. Is there a way to do so or should I just add another parameter to the template and use that as argument for insert? Thanks,
Hello Francesco, Indeed, multi_index_container provides a nested value_type typedef that you can use exactly in the way you describe. Have you encountered any problem in doing so? Thank you for using Boost.MultiIndex, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo