
This one by Greg Colvin. (BoostCon had two tracks. So why not two trip reports?) Enjoy! http://www.artima.com/cppsource -- Eric Niebler Boost Consulting www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com

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.

Mathias Gaunard wrote:
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.
I didn't mean to imply that. I meant that Sean's technique was similar to duck typing, and it uses Boost.Any's type erasure technique. -- Eric Niebler Boost Consulting www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
participants (2)
-
Eric Niebler
-
Mathias Gaunard