Skip to content

Instantly share code, notes, and snippets.

@DieHertz
Last active August 29, 2015 14:00
Show Gist options
  • Save DieHertz/11170197 to your computer and use it in GitHub Desktop.
Save DieHertz/11170197 to your computer and use it in GitHub Desktop.
#include <utility>
struct Foo {
void method_one(const int& a, bool b) {}
template<typename... T> using mem_fn_ptr = void (Foo::*)(T...);
// 1
template<typename... T> void process(mem_fn_ptr<T...>) {}
// 2
template<typename... T> void process(void (Foo::*)(T...)) {}
// currently I can't see how 1 differs from 2, yet they're not considered the same template
};
int main() {
auto f = Foo{};
f.process(&Foo::method_one);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment