I use this wrapper:
#define RETURNS(...) -> decltype(__VA_ARGS__) { return (__VA_ARGS__); }
template<class Fun>
struct function_object
{
boost::optional<Fun> f;
function_object()
{}
function_object(Fun f): f(f)
{}
function_object(const function_object & rhs) : f(rhs.f)
{}
// Assignment operator is just a copy construction, which does not provide
// the strong exception guarantee.
function_object& operator=(const function_object& rhs)
{
if (this != &rhs)
{
this->~function_object();
new (this) function_object(rhs);
}
return *this;
}
template<class F>
struct result
{};
template
From: MM
To: Boost-users@lists.boost.org Cc: Sent: Friday, September 21, 2012 6:37 PM Subject: [Boost-users] transform_iterator and c++11 lambda expression hello it would be great to be pass
transform_iterator( my_iterator, []( reference ) { return /// something } );
directly to STL algorithms.
Currently, one needs to define separately the unarfy function as far as i could see
MM _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users