@@ -739,7 +739,7 @@ void sheet_t::implementation_t::add_output(name_t name, const line_position_t& p
739739 // REVISIT (sparent) : Non-transactional on failure.
740740 cell_set_m.push_back (cell_t (
741741 access_output, name,
742- std::bind (& implementation_t ::calculate_expression, std::ref (* this ), position, expression),
742+ [position, expression, this ]() { return calculate_expression ( position, expression); } ,
743743 cell_set_m.size (), nullptr ));
744744
745745 output_index_m.insert (cell_set_m.back ());
@@ -765,8 +765,9 @@ void sheet_t::implementation_t::add_interface(name_t name, bool linked,
765765
766766 if (initializer_expression.size ()) {
767767 cell_set_m.push_back (cell_t (name, linked,
768- std::bind (&implementation_t ::calculate_expression,
769- std::ref (*this ), position1, initializer_expression),
768+ [position1, initializer_expression, this ]() {
769+ return calculate_expression (position1, initializer_expression);
770+ },
770771 cell_set_m.size ()));
771772 } else {
772773 cell_set_m.push_back (cell_t (name, linked, cell_t::calculator_t (), cell_set_m.size ()));
@@ -781,12 +782,13 @@ void sheet_t::implementation_t::add_interface(name_t name, bool linked,
781782 if (expression.size ()) {
782783 // REVISIT (sparent) : Non-transactional on failure.
783784 cell_set_m.push_back (cell_t (access_interface_output, name,
784- std::bind (&implementation_t ::calculate_expression,
785- std::ref (*this ), position2, expression),
785+ [position2, expression, this ]() {
786+ return calculate_expression (position2, expression);
787+ },
786788 cell_set_m.size (), &cell_set_m.back ()));
787789 } else {
788790 cell_set_m.push_back (cell_t (access_interface_output, name,
789- std::bind (& implementation_t ::get, std::ref (* this ), name),
791+ [name, this ]() { return get ( name); } ,
790792 cell_set_m.size (), &cell_set_m.back ()));
791793 }
792794 output_index_m.insert (cell_set_m.back ());
@@ -810,7 +812,7 @@ void sheet_t::implementation_t::add_interface(name_t name, any_regular_t initial
810812 cell.priority_m = ++priority_high_m;
811813
812814 cell_set_m.push_back (cell_t (access_interface_output, name,
813- std::bind (& implementation_t ::get, std::ref (* this ), name),
815+ [name, this ]() { return get ( name); } ,
814816 cell_set_m.size (), &cell));
815817
816818 output_index_m.insert (cell_set_m.back ());
@@ -852,7 +854,7 @@ void sheet_t::implementation_t::add_logic(name_t logic, const line_position_t& p
852854 const array_t & expression) {
853855 cell_set_m.push_back (cell_t (
854856 access_logic, logic,
855- std::bind (& implementation_t ::calculate_expression, std::ref (* this ), position, expression),
857+ [position, expression, this ]() { return calculate_expression ( position, expression); } ,
856858 cell_set_m.size (), nullptr ));
857859
858860 if (!name_index_m.insert (cell_set_m.back ()).second ) {
@@ -868,7 +870,7 @@ void sheet_t::implementation_t::add_invariant(name_t name, const line_position_t
868870 // REVISIT (sparent) : Non-transactional on failure.
869871 cell_set_m.push_back (cell_t (
870872 access_invariant, name,
871- std::bind (& implementation_t ::calculate_expression, std::ref (* this ), position, expression),
873+ [position, expression, this ]() { return calculate_expression ( position, expression); } ,
872874 cell_set_m.size (), nullptr ));
873875
874876 output_index_m.insert (cell_set_m.back ());
@@ -953,8 +955,10 @@ sheet_t::connection_t sheet_t::implementation_t::monitor_enabled(name_t n, const
953955 monitor (active_m.test (iter->cell_set_pos_m ) || (value_accessed_m.test (iter->cell_set_pos_m ) &&
954956 (touch_set & priority_accessed_m).any ()));
955957
956- return monitor_enabled_m.connect (std::bind (&sheet_t ::implementation_t ::enabled_filter, this ,
957- touch_set, iter->cell_set_pos_m , monitor, _1, _2));
958+ return monitor_enabled_m.connect (
959+ [touch_set, iter_pos = iter->cell_set_pos_m , monitor, this ](const cell_bits_t & a, const cell_bits_t & b) {
960+ enabled_filter (touch_set, iter_pos, monitor, a, b);
961+ });
958962}
959963
960964/* *************************************************************************************************/
@@ -1006,8 +1010,7 @@ sheet_t::implementation_t::monitor_contributing(name_t n, const dictionary_t& ma
10061010 monitor (contributing_set (mark, iter->contributing_m ));
10071011
10081012 return iter->monitor_contributing_m .connect (
1009- std::bind (monitor, std::bind (&sheet_t ::implementation_t ::contributing_set, std::ref (*this ),
1010- mark, _1)));
1013+ [mark, monitor, this ](const cell_bits_t & bits) { monitor (contributing_set (mark, bits)); });
10111014}
10121015
10131016/* *************************************************************************************************/
0 commit comments