Skip to content

Argument to nonstd::visit is always a const reference? #42

@AndrewGaspar

Description

@AndrewGaspar

Try as I might, I cannot use nonstd::visit on C++14 to mutate the item currently stored in a variant. If I change to -std=c++17 (and therefore use std::variant), it works.

Very simple example: https://godbolt.org/z/nsYqxs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions