Note that this compiles: std::string key( "" + p.getId() + p.getName() + p.getCategory() );
And this does not: std::string key( p.getId() + p.getName() + p.getCategory() );
This example was based on real, production code. It's a gotcha (and a tricky one at that). My recommendation is to be extremely critical of "" +. It seems insignificant and makes you wonder why some may have even typed it. The answer here appears to be to circumvent the compiler error!
Nice discussion everyone! Maybe I'll write up another one next week.