Skip to content

Generic comparison operators #95

@apolukhin

Description

@apolukhin

It could be useful to have comparison operators with types that are held in variant. For example:

variant<int, string> v1(1), v2("2");
if (v1 < 1 || v2 > "hello") {
    // ...
}

if (v1 < 1.0) { // compilation error
    // ...
}

Issue was imported from Trac 10845

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