Thursday, January 4, 2007

C++ Misunderstandings

The gcc documentation has an extra section called "C++ Misunderstandings" telling the people who is to be blamed for the most common annoyances and surprises :-)
The items are
  • static member declarations are not definitions
  • name lookup, templates and accessing members of base classes
  • temporaries may vanish before you expect
  • copy assignment operators copy virtual bases twice
Go read it. I guess every C++ programer will once stumble over each of them.

No comments:

Post a Comment