Skip to main content

Boost 1.38 incoming

Pretty soon, Boost 1.38 is going to be released. One very annoying problem has been fixed: Boost.DateTime no longer includes <windows.h> by default:

On Windows platform made inclusion of windows.h optional. The header is only used when the BOOST_USE_WINDOWS_H macro is defined. Otherwise (and by default), the library uses internal definitions of symbols from this header.

This is very nice, because the thread library also uses Boost.DateTime, which forced me to write simple wrappers and use PIMPL to avoid putting <windows.h> into my headers. I try to avoid including <windows.h> in public headers at all costs. More so as I recently had problems because it adds lots of #defines like CreateFile, which is not funny if you have a function with the same name (see also this older post about <windows.h> for tips how to handle this problem).

Building Boost worked with my old build scripts just fine, without further changes. I also gave the experimental CMake build a try, which worked fine right out of the box, and I'm really looking forward to Boost using CMake exclusively (especially as I'm sure that this will improve CMake as well). I didn't try anything fancy, just get some basic libraries built and linked, and this at least worked right out of the box.

The final version should be due in the next weeks.