tag:blogger.com,1999:blog-3663284046896592766.post5490564843822112629..comments2023-08-24T13:27:20.043+02:00Comments on tail -f /var/log/messages | grep vegard: Comparing objects in C++Vegardhttp://www.blogger.com/profile/04821963505711884515noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3663284046896592766.post-91436130880116803112012-07-15T21:35:59.967+02:002012-07-15T21:35:59.967+02:00@bert hubert If it's performance-sensitive and...<b>@bert hubert</b> If it's performance-sensitive and/or you have a lot of nested ties, you may consider just implementing your own tuple/tie that does the same thing using a compare() instead. But I like the idea, it's indeed a clever trick! Your website/blog is nice, by the way :-)Vegardhttps://www.blogger.com/profile/04821963505711884515noreply@blogger.comtag:blogger.com,1999:blog-3663284046896592766.post-43234666371846193722012-07-13T07:54:36.400+02:002012-07-13T07:54:36.400+02:00Wow, thanks! I had never realized that my 'cle...Wow, thanks! I had never realized that my 'clever' use of things like if( tie(a.remote, ourSock, a.type) < tie(b.remote, bSock, b.type)) might expand into suboptimal code!bert huberthttps://www.blogger.com/profile/18045931444457897611noreply@blogger.com