Skip to content

sum_type_alternatives<ST>::type requirements #4

@viboes

Description

@viboes

While in the D0050 proposal it is said that it is enough that the type specialize tuple_size and tuple_element, the implementation today works only if the the product type sum_type_alternatives<ST>::type is meta::types<Ts...>. In addition the tuple like type must be cheap to copy (I don't know if the last is a real constraint or one of my implementation).

This is because internally I'm using the class meta::types.

Either, I will need to restrict the type of sum_type_alternatives<ST>::type to meta::types in the proposal and describe it, or add in the proposal the cheap copy constraint and change the implementation. This change in the implementation would be quite disturbing as we can not use pattern matching to manage with recursion on the alternative types.

What others think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions