lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Avoiding PETE's overloaded operator==()


From: Vadim Zeitlin
Subject: Re: [lmi] Avoiding PETE's overloaded operator==()
Date: Sat, 5 Jun 2010 16:30:19 +0200

On Fri, 04 Jun 2010 22:30:42 +0000 Greg Chicares <address@hidden> wrote:

GC> Calling std::operator==() explicitly seems weird, but is there a
GC> better way to avoid the PETE problem below (revision 4975)?

 Unfortunately I think this is a real bug in PETE and none of the binary
operators defined in et_vector_operators.hpp can be used with 2 vectors as
all of them are defined both in (vector<T1>,vector<T2>), (vector<T1>,T2)
and (T1,vector<T2>) forms which is clearly ambiguous. I think it should be
possible to exclude the latter two from consideration by using some
boost::enable_if-like tricks to disable them when T2==vector<T1> and also
exclude the first one by enabling it only if T1!=T2. But this would take
some time because the file is generated so we'd need to modify
MakeOperators to produce the modified version and I didn't look at it yet
to see how easy or difficult will this be.

 Should I?
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]