Skip to content
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

Should the functor instances be allowed to be passed to register_function? #25

Open
bananu7 opened this issue Sep 21, 2013 · 1 comment

Comments

@bananu7
Copy link
Member

bananu7 commented Sep 21, 2013

Example functor:

template<typename A>
struct void_unary {
    void operator()(A a) { }
};

This is probably a low priority issue, but I've been wondering if we will ever want to support those. Right now the workaround is obviously to use a lambda wrapper.

@ghost
Copy link

ghost commented Sep 21, 2013

I assumed if lambdas worked, then regular (not templates) functors would too. As for templates, I think we should ask the caller so supply a list of types to instianciate the functor with, and dispatch the overloads afterwards? Would your type generator work in that kind of case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant