|
Boost : |
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2007-07-22 09:44:36
Eric Niebler wrote:
> This one by Greg Colvin. (BoostCon had two tracks. So why not two trip
> reports?) Enjoy! http://www.artima.com/cppsource
By following that link, I got on your own report.
I was surprised to see you considered boost.any to be a form of duck typing.
To me, it's not duck typing at all.
Duck typing would allow us to do stuff like this:
any a = string("hello world");
any b = a.substr(0, 5);
a = 4;
any c = a.substr(0, 5); // throws an exception, a has no member function
'substr' with that signature.
boost.any does not allow that kind of thing at all.
boost.variant is a bit closer, but apart from the fact it is limited to
a set of types it can neither do it because it would require some kind
of compile-time reflection.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk