15 Mar
2005
15 Mar
'05
6:26 p.m.
Thomas Matelich wrote:
This may be a reasonable regression, but I thought I'd bring it up in case its a regression that should be fixed. My sample code and some error outputs are attached.
This regression is caused by the fact that in 1.32, bind( &Foo::bar, _1 ) no longer returns a reference to Foo::bar; it wants to return by value instead. The change was motivated by the fact that bind( &Foo::bar, bind( createFoo ) ), where createFoo returned a Foo by value, would return a reference to an object that was already destroyed. You can fix your example by using bind<string>( &Foo::bar, _1 ), which should work on the compilers you listed. The CVS version also supports bind<string>( &Foo::bar, _1 ) == test