Boost logo

Boost :

From: Søren Frank Andersen (sfa_at_[hidden])
Date: 2001-12-03 16:42:07


Dear Douglas

I have tried to compile the new version of signals
(signals20011125.zip) with the boost release 1_26_0.
I once again get a compile error.

Søren

-------

#include <boost/signal.hpp>
#include <iostream>

void test_sig( int i ) { std::cout << i << std::endl; }

boost::signal< void, int > sig;

int main() {
        sig.connect(test_sig);
        sig(5);
        return 0;
}

-------

c:\sfa\prg\boost_1_26_0\boost\signals\signal_template.hpp(150) : error
C2440: 'type cast' : cannot convert from 'void (int)' to 'class
boost::function1<void,int,struct boost::empty_function_policy,struct
boost::empty_function_mixin,int>'
        No constructor could take the source type, or constructor overload
resolution was ambiguous
        C:\sfa\prg\signal_test\signal_test.cpp(34) : see reference to
function template instantiation 'class boost::connection __thiscall
boost::signal1<void,int,struct boost::return_last_value<void>
>::connect(void (__cdecl *)(int))' being compiled
Error executing cl.exe.
signal_test.exe - 1 error(s), 0 warning(s)


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