Added support for empty state as default and empty() function to turn it into empty
Made DynamicAnyHolder pure virtual functions (clone(), type() and all convert() and is…() overloads) virtual. All convert() overloads throw if reached at runtime, the querying is…() functions all return false. This has provided a much simpler (shorter) way to implement DynamicAnyHolder for an unknown type because only conversions provided by the holder must be overridden. Those not overridden shall throw BadCastException at runtime if attempted.
Implemented clone(), type() and value() in DynamicAnyHolder<T>. Now, because of this and the previous item, DynamicAny can store any type out-of-the-box (no more DynamicAnyHolder specialization needed).
Code is in the SVN trunk. The only potentially code breaking change is the first one. If anyone encounters any surprises, please let me know.
There’s a blog entry on the topic. Your humble correspondent posted some examples and links to DynamicAny, which caused a Boost zealot to shoot back indiscriminately. Stay tuned
An interview (Part 1 and Part 2) with B. Stroustrup and H. Sutter taken during SDWest 08. Second part is particularly interesting – they discuss functional aspects of C++ (and some other languages). The bottom line, once again: multiparadigm – way to go.