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:[EMAIL PROTECTED]]
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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to