10 Mar
2015
10 Mar
'15
1:33 p.m.
On 08/03/2015 05:27, Steven Watanabe wrote:
The calls to register_binding are necessary for this to work, unfortunately. I don't think it's possible to implement dynamic_any_cast without some kind of registration, but at least it only needs to be called once for each concept/type combination. If anyone has any better ideas about how to handle this, I'd love to hear it.
If you're doing this, you might as well implement full dynamic duck typing. If the expression is valid, you call it, otherwise you raise an exception.