|
Boost Users : |
Subject: [Boost-users] Why is cref required in this nested bind example?
From: Chris Stankevitz (chrisstankevitz_at_[hidden])
Date: 2012-12-04 18:02:34
Hello,
Can someone please explain why a cref is needed in the last line of
the attached code snippet?
Thank you,
Chris
===
#include <boost/bind.hpp>
#include <boost/function.hpp>
using boost::bind;
using boost::cref;
using boost::function;
void a()
{
}
void b(function<void()>)
{
}
void f()
{
//bind(b, bind(a));
bind(b, cref(bind(a)));
}
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