
12 Apr
2004
12 Apr
'04
2:15 p.m.
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:001501c42095$eb0425b0$1d00a8c0@pdimov2...
Thorsten Ottosen wrote:
My point is that if the prototype was
void square( int& );
then
function< void(void) > f( int x ) { return bind( square, x*5 ); }
should not compile.
Why should it not compile?
consider instead void write_to( string& s ) { s += " foo"; } string s = "bar"; bind( write_to, s )(); cout << s; // won't print "bar foo" br Thorsten