Skip to content

Feature/implemented variant class

eric pellegrini requested to merge feature/implemented-variant-class into develop

@jmfisher Here is the (final ?) version of Variant class. You know most of the implementation details. The last thing that puzzles me is the fact that we had to set:

  • Copy/Move constructors from other Variant:

    • Variant(const Variant& other)
    • Variant(Variant& other)
    • Variant(Variant&& other)
  • Copy/Move constructors from subset variant:

    • Variant(const Variant<OtherArgs...>& other)
    • Variant(Variant<OtherArgs...>& other)
    • Variant(Variant<OtherArgs...>&& other)
  • Copy/Move assignment operator from other Variant:

    • Variant(Variant& other)
    • Variant(Variant&& other)
    • Variant(const Variant& other)
  • Copy/Move assignment operator from a subset Variant:

    • Variant(Variant<OtherArgs...>& other)
    • Variant(Variant<OtherArgs...>&& other)
    • Variant(const Variant<OtherArgs...>& other)

Can we reduce this or is that the price to pay for having a correctly implemented class based on:

  • type inferring
  • move semantics
  • variadic template metaprogramming ?
Edited by eric pellegrini

Merge request reports

Loading