Original Post
I've scoured the internet for hours on this one and still cannot figure it out! Any help is appreciated.
I get an EXC_BAD_ACCESS in boost move_assign function for the copy constructor or operator= every time. I tried passing the function without boost::bind and with all different variations. No luck...
Is there a special technique I am missing for passing boost::functions around?
typedef boost::function<void ()> TaskKernel;
void TaskScheduler::pushTask(const TaskData& taskData, TaskKernel kernel)
{
Task* task = m_taskPool->obtain();
task->m_kernel = TaskKernel(kernel);
task->m_taskData = taskData;
}
// later in the calling code
sch->pushTask(TaskData(), boost::bind(&run);
I get an EXC_BAD_ACCESS in boost move_assign function for the copy constructor or operator= every time. I tried passing the function without boost::bind and with all different variations. No luck...
Is there a special technique I am missing for passing boost::functions around?