Hi all,
Could someone please tell me how to achieve a functor binding to a templated
function?
I have a namespace GenAlg with this inside:
--------------------------------------------------------------------
namespace GenAlg
{
template <class TController, class TFitness>
unsigned long RouletteWheel(TController *oController)
{
...
}
}
--------------------------------------------------------------------
elsewhere I have a
--------------------------------------------------------------------
boost::function1<unsigned long, CGAController *> fncSelection;
--------------------------------------------------------------------
I try to set fncSelection to RouletteWheel like so:
--------------------------------------------------------------------
fncSelection = boost::bind(GenAlg::RouletteWheel<CGAController, unsigned
long>,_1);
--------------------------------------------------------------------
And my compiler's reply is:
--------------------------------------------------------------------
genetics.obj : error LNK2001: unresolved external symbol "unsigned long
__cdecl GenAlg::RouletteWheel(class CGAController *)"
(?RouletteWheel@GenAlg@@YAKPAVCGAController@@@Z)
--------------------------------------------------------------------
Help? Please?
I'm sure this is stupid, simple stuff for you guys, and so annoying for me
:)
Greg
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost