Re: [Boost-users] Boost.Signals example/doc_view application question

[snip]
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); You should use m_sig(); instead!
} // ... };
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<R,F>' being compiled with [ R=boost::_bi::unspecified, F=void (__thiscall View::* )(void) const ] c:\development\SignalTest\SignalTest.cpp(49) : see reference to class template instantiation 'boost::_bi::bind_t<R,F,L>' being compiled with [ R=boost::_bi::unspecified, F=void (__thiscall View::* )(void) const, L=boost::_bi::list2<boost::_bi::list_av_2<View *,boost::arg<1>>::B1,boost::_bi::list_av_2<View *,boost::arg<1>>::B2> ] c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2039: 'result_type' : is not a member of 'operator``global namespace''' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2146: syntax error : missing ';' before identifier 'type' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2955: 'boost::_bi::type' : use of class template requires template argument list c:\Boost\include\boost-1_33_1\boost\bind.hpp(112) : see declaration of 'boost::_bi::type' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Cheers, Freddie

My example posted was incorrect. I was calling with m_sig(). Corrected below. Other ideas? many thanks! -allen On 8/4/06, Wu Yinghui, Freddie <yhwu@volumeinteractions.com> wrote:
[snip]
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(); You should use m_sig(); instead!
} // ... };
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<R,F>' being compiled with [ R=boost::_bi::unspecified, F=void (__thiscall View::* )(void) const ] c:\development\SignalTest\SignalTest.cpp(49) : see reference to class template instantiation 'boost::_bi::bind_t<R,F,L>' being compiled with [ R=boost::_bi::unspecified, F=void (__thiscall View::* )(void) const, L=boost::_bi::list2<boost::_bi::list_av_2<View *,boost::arg<1>>::B1,boost::_bi::list_av_2<View *,boost::arg<1>>::B2> ] c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2039: 'result_type' : is not a member of 'operator``global namespace''' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2146: syntax error : missing ';' before identifier 'type' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : error C2955: 'boost::_bi::type' : use of class template requires template argument
list
c:\Boost\include\boost-1_33_1\boost\bind.hpp(112) : see declaration of 'boost::_bi::type' c:\Boost\include\boost-1_33_1\boost\bind.hpp(63) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Cheers,
Freddie
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Allen Gooch
-
Wu Yinghui, Freddie