Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Does class! support generic types? #210

Description

@AndyT-MS

I'd like to create a generic type which implements a COM interface, but if class! supports that then I can't seem to figure out the syntax. Seems like this would be the way to do it, but it gives me a syntax error at the < saying that a : is expected.

com::class! {
    class MyHandler<F: Fn()> : IMyHandler
    {
        func: F,
    }
    // ... impl that calls func ...
}

I tried putting the <F: Fn()> in various other places as well, which all seemed less likely to be correct, and unsurprisingly none of them worked either. I'm figuring that class! probably just doesn't currently support this, but I'm hoping to confirm that I'm not just missing something.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions