Posts Tagged ‘Programming’
If found a very nice article about rvalue references and move semantics (primarily) by Dave Abrahams. It also considers return value optimizations, exception safety and in what state an object should be left in after its resources have been “stolen”. Here it is.
I already said it once in another post but I think it deserves to be mentioned again: Don’t underestimate the usefulness of good books about C++! Prefer buying a good book over searching the internet for tutorials, examples, explanations if you want to learn the language and/or learn about useful idioms, guidelines, etc…
I recently added two other books to my personal library: “Effective C++” and “C++ Coding Standards”. It took me only 3 weeks to finish both books. That means they were interesting and insightful. 🙂
Now, it’s these four C++ books that are in my posession:
- The C++ Programming Language (Special Edition) by Bjarne Stroustrup
- Modern C++ Design by Andrei Alexandrescu
- Effective C++ (Third Edition) by Scott Meyers
- C++ Coding Standards by Herb Sutter & Andrei Alexandrescu
I wouldn’t mention them here if I didn’t like them. 🙂
Width and value ranges of Integer types
C and C++ only specify minimum requirements regarding the width and value range of different integer types and how these are converted to each other. If you want to write portable code you should be aware of this. Check out the article Integer Types in C and C++.
Last update: 2008-10-28.
I usually tend to defend C++ but name lookup is probably one of the most complicated things in C++ to wrap your head around. Namespaces are supposed to make your life easier. They provide means to group certain things together, to avoid name clashes between two parts of your program that might have been developed independently. Since typing fully qualified names is tedious people like to use short cuts: using directives and using declarations. So far so good. How well does this work together with generic programming?