Boost logo

Boost Users :

Subject: Re: [Boost-users] boost lambda wiht bind to stringstream::str
From: Igor R (boost.lists_at_[hidden])
Date: 2010-07-15 18:45:04

> Below I am using std::transform algorithm but when I try to call
> std::stringstream::str() function using lambda::bind I receive the following
> error message:
> TestBoost15Jul.cpp:49: error: no matching function for call to
> ‘bind(<unresolved overloaded function type>, const
> boost::reference_wrapper<std::basic_stringstream<char,
> std::char_traits<char>, std::allocator<char> > >)’
>             bl::bind( &std::stringstream::str , boost::ref(outFmt) )() //
> this call to bind has some problem
>         ) );

str() member function is overloaded, so you have to type-cast it
explicitly to one of the overloads.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at