|
Boost Users : |
From: billrobertson42 (bill_at_[hidden])
Date: 2002-08-29 16:08:22
> It doesn't make sense to compare the two 'any' objects. I suppose
boost::any
> could coerce the pointer into a long, and then apply a comparison
operator,
> but the results of that comparison would be meaningless.
>
> In order to compare the objects, you'll have to extract them from
the any
> container using an any_cast. Which, of course, means you'll have to
know the
> exact type of the object being held (or which type of a known set of
types).
>
> --
> Jim
That makes sense. I suppose the best you could do is attempt to
convert the unknown contained things into strings and compare those,
but that's hardly effective.
It turns out we didn't really need any anyways. ;-)
Thanks,
Bill
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