Archive for November, 2008

Standard C++ algorithm and functional headers

Tuesday, November 25th, 2008

I’ve found joy in the standard C++ algorithm and functional headers. I finally found a nice, neat way to iterate through a container calling a specific function on all elements of the container! I used to do this sort of thing everywhere in my code: for (std::list <ROADSTRIP>::iterator i = roads.begin(); i != roads.end(); i++) […]

C++ Reseatable Reference

Friday, November 14th, 2008

After reading this article and being inspired, I decided to write a simple “reseatable_reference” class that’s sort of like boost::weak_ptr but lighter weight. The idea is that I often use pointers as reseatable references, since in C++ references cannot be reseated. So I created a reseatable_references class that’s basically a wrapper around a pointer but […]

C++ Optional Return Values

Friday, November 14th, 2008

After reading this article and being inspired, I decided to write a simple “optional” class that’s similar to boost::optional but lighter weight.  The idea is that often I write functions which should return a value but which might not have a value to return — and for those cases, I should be able to specify […]

Dev Journal and Project Hosting