C++ Threads Using Boost in 5 Minutes

C++ Threads Using boost::thread in 5 Minutes This post is the first in the new "5 Minute" series. Each post is accompanied by a 5min tutorial video on YouTube. I realized when looking for YouTube tutorials that I gravitate towards … Continue reading

Lazy Evaluation Makes for Smart map<>

Lazy Evaluation Lazy evaluation delays the evaluation of an expression until its value is needed.1 Adding a mechanism to an stl::map that calculates the value based on the key adds optional lazy evaluation. This can be used to populate the … Continue reading

Function Pointers and Member Function Pointers

Material on function pointers and member function pointers is available in a variety of books and online sources. We're doing a review here because it makes understanding boost::function and boost::bind much easier. Function Pointers Given: [cpp] double sin(double theta); double … Continue reading

Overloading Using Non-type Template Parameters

Consider the following situation: you have data to process that naturally uses the same container for storage yet needs to be processed differently based on the data "type". For example, say you are processing digital audio data and that data … Continue reading