C++0x!

Mar 28, 2011 19:41

After helping 3M move Lava C.O.S. to a great new team in St. Paul, I've started work with someone new project which involves some C++ programming, this time with Visual Studio 2010, which includes several important C++0x features I had been introduced to in David Musser's Generic Programming course in grad school ( Read more... )

c++ cpp

Leave a comment

Comments 4

tdw March 29 2011, 00:02:29 UTC
auto_ptr was the worst good idea of all time.

Reply

benfrantzdale March 29 2011, 01:36:55 UTC
Seriously? Aside from the gotcha that rvalue references fix and the gotcha that they don't belong in standard containers, what's wrong with them? Once you get over those two (really one) issues, they are beautiful. What other type should a factory return? In particular, I'm thinking of what I learned from this post: http://www.gotw.ca/publications/using_auto_ptr_effectively.htm

Reply

tdw March 29 2011, 01:44:23 UTC
Historically, my problem with them has been that a) they are not idiomatic in most / all C++ environments and a') if your codebase wasn't written with them in mind then they cause significant surprise.

Right after learning about them I thought it was brilliant, pushed to make it common at JetHead, and shortly thereafter wound up burned repeatedly. They just don't behave like any other C++ objects, don't fit with people's existing models, and are generally dragonlike (subtle, quick to anger.)

Reply

benfrantzdale March 29 2011, 02:42:35 UTC
I've never felt burned by auto_ptr, although it is idiomatic. Care to give examples?

Reply


Leave a comment

Up