> Both are correct, since one is implemented in terms of the other. That means 
> they MUST expand to exactly the same assembly (and they do, I've just tested).
> 
> If you're seeing something different, the problem is probably your code. And 
> that's why Marc is recommending qSwap: because people don't know how to use 
> std::swap. There's a big gotcha: you MUST NOT write the "std::" part of 
> std::swap.

At the risk of making a fool of myself, what is the difference? I thought I had 
learned that namespaces were just a scoping mechanism for names to avoid name 
collisions. Why does this make such a difference in the generated code?

I'm old enough now that the risk of making a fool of myself is a small price to 
pay in order to learn something.

-John Weeks

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to