
I have a quick question regarding connecting a bound member function. In
the doc_view example application signals are defined as requiring a function
taking a bool and returning nothing.
class Document
{
public:
typedef boost::signal< void (bool) > signal_t;
// ...
void append(const char* s)
{
m_text += s;
m_sig(true);
}
// ...
};
The View abstract base class requires concrete bases to provide a concrete
implementation of the refresh() member function matching the slot signature
required.
class View
{
public:
virtual void refresh(bool) const = 0;
// ...
};
Here's my problem. If I change the signal to take no args using the
preferred or portable syntax I get compilation errors:
class Document
{
public:
typedef boost::signal< void () > signal_t;
// ...
void append(const char* s)
{
m_text += s;
m_sig(true);
}
// ...
};
class View
{
public:
virtual void refresh() const = 0;
// ...
};
Compilation output (msvc-7.1):
Compiling...
SignalTest.cpp
c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2825:
'F::result_type': cannot form a qualified name
c:\Boost\include\boost-1_33_1\boost\bind\bind_template.hpp(15) : see
reference to class template instantiation 'boost::_bi::result_traits