|
Boost Users : |
From: Stephen Torri (storri_at_[hidden])
Date: 2007-05-19 12:03:20
On Sat, 2007-05-19 at 16:23 +0100, Stuart Dootson wrote:
> > Its close but not quite. I get an error message that _1 is ambiguous
> >
> > Append_Frame.cpp:48: error: reference to '_1' is ambiguous
> > /usr/include/boost/lambda/core.hpp:69: error: candidates are: const boost::lambda::placeholder1_type& boost::lambda::<unnamed>::_1
> > /usr/include/boost/bind/placeholders.hpp:54: error: boost::arg<1> <unnamed>::_1
> >
> > Stephen
>
> Nat's using Boost.Bind, not the bind in Boost.Lambda - they both
> define _1 as a placeholder, so they clash...
>
> Using bind from Boost.Lambda, you'll need nested binds to cope with shared_ptr:
>
> using namespace boost::lambda;
> std::for_each(m_data.begin(), m_data.end(),
> output << bind(&Verification_Type_Info::to_String,
> bind(boost::shared_ptr<Verification_Type_Info>::get, _1),
> new_indent_limit));
I think we are closer.
Append_Frame.cpp: In member function 'virtual std::string libreverse::java_module::Append_Frame::to_String(uint32_t) const':
Append_Frame.cpp:50: error: invalid use of non-static member function 'T* boost::shared_ptr<T>::get() const [with T = libreverse::java_module::Verification_Type_Info]'
make[6]: *** [libio_java_class_la-Append_Frame.lo] Error 1
I am not sure the second bind is doing what you wanted.
Stephen
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