No, this doesn't work. Boost includes have to be included first, otherwise there are compile errors. @TomFischer says this is because of macros defined in boost, but that's the way it is...