|
Boost Users : |
Subject: Re: [Boost-users] boost lambda wiht bind to stringstream::str
From: Igor R (boost.lists_at_[hidden])
Date: 2010-07-15 20:00:14
> 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 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