Skip to content

Optional's can't be used with move only types. #66

@voldyman

Description

@voldyman

The Optional implementation doesn't handle r-value references and hence can't be used with move-only types, like std::unique_ptr.

Adding a move constructor solves this problem, http://ideone.com/PpByK5

sidenote: the rule of 5 might be applicable http://en.cppreference.com/w/cpp/language/rule_of_three

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