Skip to content

Commit

Permalink
using std::placeholder alias, addresses issue #18
Browse files Browse the repository at this point in the history
  • Loading branch information
patflick committed Sep 26, 2018
1 parent 704f251 commit 1ad54ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/mxx/reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ class custom_op {
}
if (!m_builtin) {
// create user function
using namespace std::placeholders;
using ph = std::placeholders;
m_user_func = std::bind(custom_op::custom_function<Func>,
std::forward<Func>(func), _1, _2, _3, _4);
std::forward<Func>(func),
ph::_1, ph::_2, ph::_3, ph::_4);
// get datatype associated with the type `T`
mxx::datatype dt = mxx::get_datatype<T>();
// attach function to a copy of the datatype
Expand Down

0 comments on commit 1ad54ce

Please sign in to comment.