Category Archives: C++

How to compile BOOST under MS Visual Studio 2010

Fortunately, to compile BOOST under MS VC 2010 we need Visual Studio Command Prompt and five commands:

Navigate to BOOST directory, for example:

cd F:\Projects\Lib\boost_1_53_0


An STL-like C++ list class

A long time ago I written an STL-like implementation of such simple thing as linked list, probably it sounds a bit strange, but it does not use if operator at all Smile

Generalization of auto_ptr<T> for working with Win32 API

STL has auto_ptr<Type> class that automatically deletes a dynamically allocated C++ object when control leaves a block. Personally, I believe that auto_ptr<Type> typically used in simple scenarios as a local variable or a class member but theoretically it is even possible to declare a vector of auto_ptr<Type> because auto_ptr<Type> stores an ownership indicator and its copy constructor transfers the ownership from the instance being copied, so vector::push_back(…) and vector::resize(…) functions works correctly.