Skip to content

Instantly share code, notes, and snippets.

@pfultz2
Created July 23, 2015 19:04
Show Gist options
  • Select an option

  • Save pfultz2/4832d6ba2d92ae44924a to your computer and use it in GitHub Desktop.

Select an option

Save pfultz2/4832d6ba2d92ae44924a to your computer and use it in GitHub Desktop.
#define MEMBER_LIFT_CLASS(m) \
struct member_##m { \
template<class T, class... Ts> \
auto operator()(T&& x, Ts&&... xs) const -> decltype(x.m(std::forward<Ts>(xs)...)) \
{ return x.m(std::forward<Ts>(xs)...); } \
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment