Boost logo

Boost :

From: Amélie et François Dumont (francois.amelie_at_[hidden])
Date: 2003-02-10 16:56:57


In theory we could even have writen:

fncSelection = GenAlg::RouletteWheel<CGAController, unsigned long>;

but it is the same problem with MSVC6 that with the & form. If anyone has a
little time I would be interesting in understanding why MSVC6 doesn't accept
that!

Thanks

-----Original Message-----
From: Greg Dehaas [mailto:GregDehaas_at_[hidden]]
Sent: Monday, February 10, 2003 8:23 AM
To: 'Boost mailing list'
Subject: RE: [boost] Re: binding

Unfortunately, just using &functionname doesnt work on template functions
( fncSelection = &GenAlg::RouletteWheel<CGAController, unsigned long>; )

I tried it and it gets confused about the template parameters
(thinks there are different possible functions)

boost::ptr_fun works fine though.. Thanx
I really could have used that function earlier on!

-----Original Message-----
From: Peter Dimov [mailto:pdimov_at_[hidden]]
Sent: Saturday, February 08, 2003 5:27 PM
To: Boost mailing list
Subject: Re: [boost] Re: binding

Amélie et François Dumont wrote:
> Just a little remark about the code that has nothing to do with the
> bug that has been elucidated by Graig Henderson. When Greg Dehaas
> wrote:
[...]
>> fncSelection = boost::bind(GenAlg::RouletteWheel<CGAController,
>> unsigned long>,_1);
>
> It seems to me that it would have been more accurate to write:
>
> fncSelection = boost::ptr_fun(GenAlg::RouletteWheel<CGAController,
> unsigned long>);
>
> there is no use for the boost::bind function even if the result is
> finally the same ;-)

There's no need to use ptr_fun, either.

fncSelection = &GenAlg::RouletteWheel<CGAController, unsigned long>;

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk