|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-09-02 21:24:24
On Monday 02 September 2002 05:25 am, Alexander Nasonov wrote:
> Ok, let it be dynamic_any. Here is only one mirror problem. Three words in
> dynamic_any_cast while all others known (to me) casts consist of two words:
> static_cast, reinterpret_cast, dynamic_cast, any_cast, lexical_cast,
> numeric_cast and so on.
Why is this a problem? I thought that dynamic_any would use the same names as
any (e.g., any_cast)
> I'd like to get responces about operators == and != for dynamic_any and
> using of std::set<dynamic_any> and std::map<dynamic_any, value_type>. How
> often they were simulated and how successully? Your responces can help to
> understand real need of these features.
any/dynamic_any starts losing its usefulness when we add more requirements on
the types contained in them. It would, however, be _extremely_ interesting if
one could extend any/dynamic_any in a way that supported user-defined sets of
operations on any/dynamic_any objects (e.g., one might want !=, ==, *, and ++
defined to make 'any' work on input & forward iterators). Might be able to do
this by using mixins with virtual functions...
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk