From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-30 07:39:58
From: "Philip Nash" <philip.nash_at_[hidden]>
> Hmm, interesting - thanks for the reply and example, btw.
> Are you compiling that with MSVC, though?
> I did actually try that (if I have understood correctly).
> I have reduced my attempt down to this example:
> int __stdcall AddFn( int x, int y )
> return x+y;
> void SomeOtherFunction()
> boost::bind<int>( &AddFn, 2, 3 ); // compiler error here
> And I am still getting a compiler error "type 'int' unexpected" ???
Works for me in both VC6 and VC7b2. Looks like you've some other problem
(there is a "special" VC section in the documentation.) This syntax is ery
fragile on VC; 'using boost::bind' breaks it, as does having a class
template named 'bind' _in any namespace_.
> As for the "interesting extension", could it be accomplished as an
> You obviously wouldn't want __stdcall, or other proprietry extensions
> polluting the bind interface, but as a seperate adapter...?
It probably can but it's not worth it. :-)
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk