|
Boost Users : |
Subject: Re: [Boost-users] boost lambda wiht bind to stringstream::str
From: Conoscenza Silente (abruzzoforteegentile_at_[hidden])
Date: 2010-07-16 02:13:25
It works!
Thanks
Afg
On Fri, Jul 16, 2010 at 2:00 AM, Igor R <boost.lists_at_[hidden]> wrote:
> > P.S. I used this code for my checkings
> > std::string outString;
> > bl::var_type< std::string >::type _outString( bl::var(outString) );
> > ...
> > _outString = bl::bind(
> >
> >
> static_cast<std::string(std::stringstream::*)()const>(&std::stringstream::str),
> > boost::ref(_outFmt) )(),
> > std::cout << _outString << '\n', // Here I have
> > always an empty string
> > // so the previous call to bind doesn't really return
> > anything..do you know why?
>
> Remove "()" after the bind:
>
> static_cast<std::string(std::stringstream::*)()const>(&std::stringstream::str),
> boost::ref(_outFmt) )
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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