Subject: [boost] [Fusion] Heterogeneous comparison rationale?
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2014-06-08 12:46:22


Dear list,

Is there a reason why Fusion does not support comparing objects of different
types? For example, the following will trigger a compilation error inside the
library because there is no operator==(int, X):

    struct X { };
    assert(make_vector(1, 2) != make_vector(1, X{}));

In the context of programming with heterogeneous types, one could reasonably
argue that the above should compile and pass the assertion. Of course, then
the library can't use operator== to compare objects internally, but that's
an implementation detail.

So I'm really looking for a rationale for that design decision and/or
comments from people about which way they think it should be and why.

Regards,
Louis Dionne