In C++11, is there a way to template a lambda function? Or is it inherently too specific to be templated?
I understand that I can define a classic templated class/fu
There is a gcc extension which allows lambda templates:
// create the widgets and set the label base::for_each(_widgets, [] (boost::fusion::pair& pair) -> void { pair.second = new Widget_T(); pair.second->set_label_str(Key_T::label); } );
where _widgets is a std::tuple< fusion::pair... >
_widgets
std::tuple< fusion::pair... >