Boost logo

Boost :

From: Søren Frank Andersen (sfa_at_[hidden])
Date: 2001-11-25 12:33:38


I have been trying to compile the signal library with MSVC6
I have come up with the following problems.

1)
The local class temporarily_set_clearing, needs to access the flags struct
in boost::detail::signals::signal_base.
This struct is private, so the local class can not access it.
It works if I make flag public.

Simple example to illustrate the problem:

class A {
        int x;
public:
        A() {
                class B {
                public:
                        B( A * a ) {
                                a->x = 0; // error can not access private member x
                        }
                } b( this );
        }
};

2)
When I compile the following simple program ( from Steven Kirk )

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

void test_sig(int x)
{
    std::cout << x << '\n';
}

boost::signal<void, int> sig;

int main(int argc, char* argv[])
{
        sig.connect(test_sig);
    sig(5);

    return 0;
}

I get the error:

Compiling...
signal_test.cpp
c:\sfa\prg\boost\boost\signals\signal_template.hpp(221) : error C2065:
'make_slot_call_iterator' : undeclared identifier
        c:\program files\microsoft visual studio\vc98\include\xmemory(59) :
while compiling class-template member function 'struct
boost::detail::function::unusable __thiscall boost::signal1<void,int,struct
boost::return_last_value<void> >::operator
 ()(int)'
c:\sfa\prg\boost\boost\signals\signal_template.hpp(159) : 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(33) : 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 - 2 error(s), 0 warning(s)

I have been unable to find out what is wrong?
I hope someone have a fix for this, because I really like the library

Søren Andersen


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