Skip to content

Type parameters on statics #10798

Closed
Closed
@brendanzab

Description

@brendanzab

Would this be possible?

pub enum Reply<V, StopReason> {
    Reply(V),
    Stop(StopReason),
}

pub static Continue<StopReason>: Reply<(), StopReason> = Reply(());

I guess it would be less useful than the C++14 proposal seeing as our constexprs are currently so limited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions