Skip to content

Automatically setting variant type when assigning values #538

@HO-COOH

Description

@HO-COOH

wil::unique_variant could automatically set its vt member when assigning a value. I have 2 ways to approach this:

  1. Overload operator= directly in wil::unique_variant, so assigning a value automatically sets vt
wil::unique_variant value;
value = 42;
  1. Make all union member a setter function, eg.
wil::unique_variant value;
value.lVal(42);

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