Pizer’s Weblog

programming, DSP, math

Posts Tagged ‘Programming

C++0x: Rvalue references 101

leave a comment »

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.

[Edit 2009-08-18: The link doesn’t seem to work anymore. However, Dave Abrahams has started to refine, extend, and convert it into a series of blog posts on his new site ]

– P


Written by pizer

May 27, 2009 at 2:22 pm

Books, Books, Books (on C++)

with 5 comments

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. 🙂

– P

Written by pizer

February 22, 2009 at 2:01 am

Posted in Programming

Tagged with , , ,

Writing portable C and C++ code

leave a comment »

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++.

Read the rest of this entry »

Written by pizer

December 18, 2008 at 5:11 pm

Fun with C++ namespaces [sarcasm]

leave a comment »

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?

Read the rest of this entry »

Written by pizer

October 22, 2008 at 5:21 pm