boost bind beginner throw problem

Hi, I have a problem with boot bind, in a my class there is this member: void test(int i) throw(Error); If I use bind(&test,obj,_1); I have a compilation error, instead if I change the member in void test(int i); all it works. Could someone help me to use bind with my original member ? I do not understand where is the problem. Thanks SO: windows XP SP2 compiler: VC 7.1 boot version: 1.34.1 -- Roberto *sono affetto da discromatopsia, per favore evitate l'invio di mail o allegati colorati* *I have dyschromatopsia, please do not send coloured text or email and attach*

From: "Taglioretti Roberto"
Hi, I have a problem with boot bind, in a my class there is this member:
void test(int i) throw(Error);
If I use bind(&test,obj,_1); I have a compilation error, instead if I change the member in
void test(int i);
all it works.
The following program works for me with VC 7.1. #include <boost/bind.hpp> struct Error { }; struct X { void test( int i ) throw( Error ) { } }; int main() { X obj; boost::bind( &X::test, obj, _1 ); }
participants (2)
-
Peter Dimov
-
Taglioretti Roberto