
On Sat, May 31, 2008 at 8:23 AM, Marco Costalba <mcostalba@gmail.com> wrote:
Sorry for the delay. I just put it on vault.
I'm just back after a week off-line due to my job. This is a great news, I'm going to download right now.
More to come...
Hi Daniel, I have downloaded and tested Function Objects/polymorphic_function.zip from boost vault. Very nice stuff! really! a lot of new tricks to learn ;-) I have immediately replaced boost::function with boost::functional::polymorphic_function in msf-1.2 (also under vault, but in base directory) and gave it a spin. Unfortunately I was not able to make it work. Some boost::function API, necessary for msf-1.2, are not supported: operator==(), empty(), clear(), contains() I said, ok not a biggie, I can just use polymorphic_function::target() and build something similar myself. But what stopped me is that target() does not seem to work. int foo1(char) { return -1; } boost::functional::polymorphic_function<int(char)> poly_fun(foo1); poly_fun.target(); // compile error here ! Under gcc 4.2.3 I have test.cpp: In function 'int main(int, char**)': test.cpp:88: error: no matching function for call to 'boost::functional::polymorphic_function<int ()(char), false>::target()' I have checked the code and especially the SFINAE conditions in RANK_N_ACCESSOR, but I failed to understand why it doesn't work. Thanks Marco