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

Remove ::template method ugliness when using templated Methods #47

Closed
Anton3 opened this issue Apr 17, 2023 · 1 comment
Closed

Remove ::template method ugliness when using templated Methods #47

Anton3 opened this issue Apr 17, 2023 · 1 comment

Comments

@Anton3
Copy link

Anton3 commented Apr 17, 2023

See a snippet from examples:

template<typename Signature>
using function_ref = aa::poly_ref<aa::call<Signature>::template method>;

This is required because AnyAny works with template template parameters.

It wouldn't be required if we slightly modified the way Methods are defined.

Before:

template <typename T>
struct Foo {
  static void do_invoke(T&) { ... }

  template <typename CRTP>
  struct plugin {
    void foo() const { ... }
  };
};

After:

struct Foo {
  template <typename T>
  static void do_invoke(T&) { ... }

  template <typename CRTP>
  struct plugin {
    void foo() const { ... }
  };
};

It has the additional benefit that it forces plugin not to depend on T, purely syntactically.

@kelbon
Copy link
Owner

kelbon commented May 7, 2023

Method now is a typename and not template typename

@kelbon kelbon closed this as completed May 7, 2023
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

2 participants