Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind] Pointer as third parameter
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-12-18 08:49:31


Jean-Pierre Bergamin:
...

>>> f(a, b, &c);

...

> I just found out that it works with boost 1.37 on MSVC 8, but not with
> 1.34.1.
> Any clue how to get this working with 1.34.1 (since 1.37 is not avaialable
> for FreeBSD yet)?

The problem is that, in 1.34, 'f' doesn't accept non-const rvalues
(temporaries). You can fix that with

    int * pc = &c;
    f( a, b, pc );

or with

    f( a, b, static_cast< int* const& >( &c ) );

--
Peter Dimov
http://www.pdplayer.com 

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