[C++-sig] Something like boost::any ... custom conversions?

Stefan Seefeld seefeld at sympatico.ca
Thu Nov 3 02:38:23 CET 2005


Alex Mohr wrote:
> Suppose I have a type that is much like boost::any.  If I have an 
> instance of this in python (say holding an int), then I want to be able 
> to call wrapped c++ code which takes arguments of held types (say 
> foo(int)) by passing my any-like object directly.

Out of curiosity, why don't you just let python do the type dispatching
for you ? It seems strange to work in a hybrid python/C++ world and then
use a tool that adds dynamic (i.e. runtime-) type dispatching to C++.

Thanks,
		Stefan



More information about the Cplusplus-sig mailing list