Boost logo

Boost Users :

From: Wu Yinghui, Freddie (yhwu_at_[hidden])
Date: 2006-08-04 21:50:25


[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





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net