-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove boost refs #108
Remove boost refs #108
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
/**************************************************************************************************/ | ||
|
||
using namespace std; | ||
using namespace std::placeholders; | ||
namespace ph = std::placeholders; | ||
|
||
/**************************************************************************************************/ | ||
|
||
|
@@ -199,9 +199,9 @@ eve_callback_suite_t bind_layout(const bind_layout_proc_t& proc, sheet_t& sheet, | |
eve_callback_suite_t suite; | ||
|
||
suite.add_view_proc_m = std::bind( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider bind -> lambda? |
||
proc, _1, _3, std::bind(&evaluate_named_arguments, std::ref(evaluator), _4)); | ||
suite.add_cell_proc_m = std::bind(&add_cell, std::ref(sheet), _1, _2, _3, _4); | ||
suite.add_relation_proc_m = std::bind(&add_relation, std::ref(sheet), _1, _2, _3, _4); | ||
proc, ph::_1, ph::_3, std::bind(&evaluate_named_arguments, std::ref(evaluator), ph::_4)); | ||
suite.add_cell_proc_m = std::bind(&add_cell, std::ref(sheet), ph::_1, ph::_2, ph::_3, ph::_4); | ||
suite.add_relation_proc_m = std::bind(&add_relation, std::ref(sheet), ph::_1, ph::_2, ph::_3, ph::_4); | ||
suite.add_interface_proc_m = [&sheet](name_t name, bool linked, const line_position_t& position1, | ||
const array_t& initializer, const line_position_t& position2, | ||
const array_t& expression, const std::string& brief, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
/**************************************************************************************************/ | ||
|
||
using namespace std::placeholders; | ||
namespace ph = std::placeholders; | ||
|
||
/**************************************************************************************************/ | ||
|
||
|
@@ -21,7 +21,7 @@ namespace adobe { | |
|
||
queryable_sheet_t::queryable_sheet_t(adam_parser& p) : no_pure_outputs_m(true), parser_m(p) { | ||
// attach the VM to the sheet. | ||
sheet_m.machine_m.set_variable_lookup(std::bind(&adobe::sheet_t::get, &sheet_m, _1)); | ||
sheet_m.machine_m.set_variable_lookup(std::bind(&adobe::sheet_t::get, &sheet_m, ph::_1)); | ||
|
||
parser_m.adam_callback_suite_m = setup_callbacks(); | ||
(void)parser_m.is_sheet_specifier(sheet_name_m); | ||
|
@@ -43,35 +43,41 @@ void queryable_sheet_t::begin_monitoring() { | |
std::size_t i(iter->second); | ||
name_t& name(name_m[i]); | ||
sheet_m.monitor_enabled(name, NULL, NULL, | ||
std::bind(adobe::assign(), _1, std::ref(active_m[i]))); | ||
std::bind(adobe::assign(), ph::_1, std::ref(active_m[i]))); | ||
|
||
std::vector<name_t> v; | ||
v.push_back(name); | ||
sheet_m.monitor_enabled( | ||
dummy, &v[0], 1 + &v[0], | ||
std::bind(adobe::assign(), _1, std::ref(priority_accessed_m[i]))); | ||
std::bind(adobe::assign(), ph::_1, std::ref(priority_accessed_m[i]))); | ||
|
||
sheet_m.monitor_value(name, std::bind(adobe::assign(), _1, std::ref(value_m[i]))); | ||
sheet_m.monitor_value(name, [&value_m_at_index_i = value_m[i]](any_regular_t val) { | ||
adobe::assign{}(val, value_m_at_index_i); | ||
}); | ||
|
||
sheet_m.monitor_contributing( | ||
name, dictionary_t(), std::bind(adobe::assign(), _1, std::ref(contributors_m[i]))); | ||
name, dictionary_t(), std::bind(adobe::assign(), ph::_1, std::ref(contributors_m[i]))); | ||
} | ||
|
||
for (queryable_sheet_t::index_t::iterator iter = output_index_m.begin(), | ||
e = output_index_m.end(); | ||
iter != e; ++iter) { | ||
std::size_t i(iter->second); | ||
sheet_m.monitor_value(name_m[i], std::bind(adobe::assign(), _1, std::ref(value_m[i]))); | ||
sheet_m.monitor_value(name_m[i], [&value_m_at_index_i = value_m[i]](any_regular_t val) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With clang-14/16, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have an understanding of why? Maybe it would be better to fix the underlying cause. |
||
adobe::assign{}(val, value_m_at_index_i); | ||
}); | ||
|
||
sheet_m.monitor_contributing( | ||
name_m[i], dictionary_t(), | ||
std::bind(adobe::assign(), _1, std::ref(contributors_m[i]))); | ||
std::bind(adobe::assign(), ph::_1, std::ref(contributors_m[i]))); | ||
} | ||
for (queryable_sheet_t::index_t::iterator iter = invariant_index_m.begin(), | ||
e = invariant_index_m.end(); | ||
iter != e; ++iter) { | ||
std::size_t i(iter->second); | ||
sheet_m.monitor_value(name_m[i], std::bind(adobe::assign(), _1, std::ref(value_m[i]))); | ||
sheet_m.monitor_value(name_m[i], [&value_m_at_index_i = value_m[i]](any_regular_t val) { | ||
adobe::assign{}(val, value_m_at_index_i); | ||
}); | ||
} | ||
} | ||
|
||
|
@@ -113,10 +119,10 @@ any_regular_t queryable_sheet_t::inspect(const array_t& expression) { | |
adam_callback_suite_t queryable_sheet_t::setup_callbacks() { | ||
adam_callback_suite_t callbacks(adobe::bind_to_sheet(sheet_m)); | ||
callbacks.add_cell_proc_m = std::bind(&queryable_sheet_t::add_cell_trap, this, | ||
callbacks.add_cell_proc_m, _1, _2, _3, _4); | ||
callbacks.add_cell_proc_m, ph::_1, ph::_2, ph::_3, ph::_4); | ||
callbacks.add_interface_proc_m = | ||
std::bind(&queryable_sheet_t::add_interface_trap, this, callbacks.add_interface_proc_m, | ||
_1, _2, _3, _4, _5, _6); | ||
ph::_1, ph::_2, ph::_3, ph::_4, ph::_5, ph::_6); | ||
return callbacks; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly. What is the ambiguity? Before accepting this change, I'd like to understand the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick test - https://godbolt.org/z/Ydjff99Mo
Where does the ambiguity originate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error message is as following,
boost/bind.hpp
is indirectly included throughboost/signals2/signal.hpp
.