You're right. I'll change this to:
/* A stable comparison functor to sort trees. */
struct tree_compare_decl_uid {
bool operator ()(const tree &xa, const tree &xb) const
{
return DECL_UID (xa) < DECL_UID (xb);
}
};New patch attached. Thanks, -Aditya ---------------------------------------- > Date: Fri, 13 Mar 2015 19:02:11 +0000 > Subject: Re: Proposal for adding splay_tree_find (to find elements without > updating the nodes). > From: [email protected] > To: [email protected] > CC: [email protected]; [email protected]; [email protected] > > Are you sure your compare_variables functor is correct? > > Subtracting the two values seems very strange for a strict weak ordering. > > (Also "compare_variables" is a pretty poor name!)
splay.patch
Description: Binary data
