|
Boost Users : |
Subject: Re: [Boost-users] [Any] Operator ==
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-11-03 12:20:22
I wrote:
> >> In case you're wondering why I'd interested in
> such operators, the answer is that I'm thinking of storing
> objects of type boost::any in an unordered_map.
> > Wouldn't this just be the address of the object (which
> isn't
> > particularly useable as a key in a map)?
OvermindDL1 wrote:
> Actually it would be possible. For example, Adobe's Any version has a
> streaming operator (which throws I think if the stored type
> does not support streaming, or just does not accept it, one or the
> other).
Would you mind providing a link to that please?
> The way it does it can easily be extended to handle a == of the
> internal value (not just the type) as well.
Actually, I found out that I can store addresses of objects of type any in a set and get my desired functionality. But, I would still need to implement a wrapper around Boost.Any.
> Hmm, perhaps it is time for an extended Boost.Any that
> supports
> 'concepts' of a sort of the stored types. Hmm,
> Boost.Proto could
> probably simplify the scaffolding a lot as well...
In fact, I'm in need of that for a maniac idea to be used by my Proto components. So, I would be interested to hear more about this if you don't mind.
TTFN,
--Hossein
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