Boost logo

Boost :

From: Marco Costalba (mcostalba_at_[hidden])
Date: 2008-06-01 04:10:27

On Sat, May 31, 2008 at 8:23 AM, Marco Costalba <mcostalba_at_[hidden]> 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/ 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);; // 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),

I have checked the code and especially the SFINAE conditions in
RANK_N_ACCESSOR, but I failed to understand why it doesn't work.


Boost list run by bdawes at, gregod at, cpdaniel at, john at