4 ms·
> One time I tried to create a list<map<int>>, and my syntax errors caused the dead to walk among the living. yeah coffee is a heck of a drug ;-)
by mistrial9 2y ago
> One time I tried to create a list<map<int>>, and my syntax errors caused the dead to walk among the living.
yeah coffee is a heck of a drug ;-)
- moron4hire 2y agoOlder C++ compilers couldn't distinguish between a right-shift operator and the closing of multiple template parameter lists, but few people figured out you just had to put spaces between all those >s.
- Thorrez 2y agoThe old C++ language specification said you needed a space. C++11 changed that, saying you don't need a space. https://stackoverflow.com/a/15785583 https://stackoverflow.com/a/15785583
- moron4hire 2y agoIn 2005, I didn't know anyone who could afford a copy of the specification. My point was that many of the other C++ programmers I knew at the time assumed it wasn't possible to nestedly use type parameters, so they just avoided it. I'm sure there were probably a cryptic error message and several toxic message board communities involved, too.
- Thorrez 2y agoI think hardly any C++ programmers look at the actual specification even today. Once in a while someone will reference the draft specification immediately prior to the actual specification (because the draft is available for free). People mostly look at sites like stack overflow and cppreference.com , via Google. I don't know what the status of that type of documentation was in 2005.
- frutiger 2y agoThe problem is that map requires two template parameters and not just one.