Boost logo

Boost :

Subject: Re: [boost] [variant2] Formal review
From: Bjorn Reese (breese_at_[hidden])
Date: 2019-04-14 09:42:29

On 4/13/19 7:26 PM, Bjorn Reese via Boost wrote:

> Better compiler error messages would be desirable. For instance, if we
> use an illegal visitor that has different return types, then the
> compiler error does not give us any hint about the different return
> types.

A possible solution is to declare a tag and use this in the else-part
of mp_if. E.g.

struct return_types_must_be_the_same;

template<class L> using front_if_same =
mp11::mp_if<mp11::mp_apply<mp11::mp_same, L>, mp11::mp_front<L>,

Boost list run by bdawes at, gregod at, cpdaniel at, john at