I can't get it to work in this case.
void TreeView::clear()
{
using boost::lambda::_1;
// TreeNodeChildren is an STL-like container of Gtk::TreeRow
// const Gtk::TreeRow& is interchangable with const Gtk::TreeIter&
// refStore->erase takes a const Gtk::TreeIter&
Gtk::TreeNodeChildren children = scriptsRow.children();
std::for_each(children.begin(), children.end(), refStore->erase(_1));
}
Errors:
In member function ‘void TreeView::clear()’:
error: no matching function for call to ‘Gtk::TreeStore::erase(const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >&)’
note: candidates are: Gtk::TreeIter Gtk::TreeStore::erase(const Gtk::TreeIter&)
=== Build finished: 1 errors, 0 warnings ===
Thanks.