Re: [Boost-users] lambda and shared_ptr?

Peter, Thanks for the reply. I must be doing something dumb, because now I'm getting a build error. I think this *might* be the important part: /usr/include/boost/detail/is_incrementable.hpp:59: error: no match for 'operator++' in '++boost::detail::is_incrementable_::impl<boost::shared_ptr<int> >::x' The 799B source file is here: http://mark.santaniello.net/files/hof2.cpp The 19KB error message is here: http://mark.santaniello.net/files/err.txt :) -Mark

Mark Santaniello (AMD) wrote:
Apparently, boost::detail::is_incrementable doesn't work on your compiler; this in turn breaks boost::indirect_reference and the return type deduction for lambda's operator*. But I should also note that *constant(n) += _1 doesn't seem to work even when the compiler supports is_incrementable, because for some reason, Lambda thinks that dereferencing a const pointer yields a const reference. return ret<int&>( *constant(pn) ) += _1; compiles for me, though.
participants (2)
-
Mark Santaniello (AMD)
-
Peter Dimov