Boost logo

Boost Users :

From: Joe McCay (joemccay_at_[hidden])
Date: 2006-04-16 21:36:52


   Any ideas on how to store the type of an object stored in an any instance
for later use in comparisons (like <, >, ==, etc)? I don't want to store an
instance of the class unless necessary. I thought about storing a pointer
to the type, but could that be used with any_cast?

like:

template<class type>
class typestuffPOD {
    typedef type value_type;
     type *datatype_;
}

   This requires knowing the type when you want to use the any_cast.

Sincerely,
Joe McCay



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