Skip to content

Comment on Libraries in C++ for ACMparent

Comments

Thanks for the summary. This is my code. I've since switched to using "Bst" instead of "BST" for class names. I've also stopped putting spaces inside parentheses and angle brackets. Although I still think that code looks better with the spaces, I realize that most people don't format it that way, and I'm fine going with the popular convention.

This really sucks for angle brackets though. Compare

vector<pair<int, string> > blah;

to

vector< pair< int, string > > blah;

I actually prefer the first one, since it's the closest that C++03 will allow to what I want. In C++0x, you will be able to say

  vector<pair<int, string>> blah;
And the parser will recognize >> as the end of two template calls, and not the stream operator.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.