12 Apr
2016
12 Apr
'16
10:33 a.m.
Seth, On 2016-04-12 16:36, Seth wrote:
On 11-04-16 05:45, Vladimir Batov wrote:
bool operator(T const& p1, T const& p2) { return &p1 < &p2; }
addressof() and std::less<> need to be used there :)
Indeed... but I'll probably strangle the one who overloaded operator& and then 'd ask him why he needed to do that. :-) ... and for the primitive snipped used std::less<> does not seem essential (we do not seem to care for actual order). In fact, std::unordered_set would likely be more appropriate. ... But thank you for reminding how scary and unfamiliar a simple code might become to be truly generic.